Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

Error with non US-ASCII user names / full names (Slack) #196

Open
jaybrueder opened this issue Jul 25, 2016 · 1 comment
Open

Error with non US-ASCII user names / full names (Slack) #196

jaybrueder opened this issue Jul 25, 2016 · 1 comment

Comments

@jaybrueder
Copy link

I cannot run the auth users find command if the User's profile contains non US-ASCII characters.

Here is an example from the logs if I am looking for my user which has "Jürgen Brüder" as a full name in the Slack profile:

2016-07-25_12:14:50.05531 /opt/lita/vendor/ruby/2.1.0/gems/multi_json-1.12.1/lib/multi_json/adapters/json_common.rb:19:in `encode': "\xC3" on US-ASCII (Encoding::InvalidByteSequenceError)
2016-07-25_12:14:50.05536   from /opt/lita/vendor/ruby/2.1.0/gems/multi_json-1.12.1/lib/multi_json/adapters/json_common.rb:19:in `to_json'
2016-07-25_12:14:50.05539   from /opt/lita/vendor/ruby/2.1.0/gems/multi_json-1.12.1/lib/multi_json/adapters/json_common.rb:19:in `dump'
2016-07-25_12:14:50.05540   from /opt/lita/vendor/ruby/2.1.0/gems/multi_json-1.12.1/lib/multi_json/adapter.rb:25:in `dump'
2016-07-25_12:14:50.05541   from /opt/lita/vendor/ruby/2.1.0/gems/multi_json-1.12.1/lib/multi_json.rb:139:in `dump'
2016-07-25_12:14:50.05542   from /opt/lita/vendor/ruby/2.1.0/gems/lita-slack-1.7.2/lib/lita/adapters/slack/rtm_connection.rb:89:in `payload_for'
2016-07-25_12:14:50.05544   from /opt/lita/vendor/ruby/2.1.0/gems/lita-slack-1.7.2/lib/lita/adapters/slack/rtm_connection.rb:104:in `safe_payload_for'
2016-07-25_12:14:50.05545   from /opt/lita/vendor/ruby/2.1.0/gems/lita-slack-1.7.2/lib/lita/adapters/slack/rtm_connection.rb:62:in `block (2 levels) in send_messages'
2016-07-25_12:14:50.05546   from /opt/lita/vendor/ruby/2.1.0/gems/lita-slack-1.7.2/lib/lita/adapters/slack/event_loop.rb:10:in `block in defer'
2016-07-25_12:14:50.05547   from /opt/lita/vendor/ruby/2.1.0/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:1076:in `call'
2016-07-25_12:14:50.05548   from /opt/lita/vendor/ruby/2.1.0/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:1076:in `block in spawn_threadpool'

There is no output/message reaching the Slack channel where the command was issued.

The expected output/message would be:

Jürgen Brüder (ID: <USER-ID>, Mention name: jaybrueder)

The problem does not exists if I change my full name to "Juergen Brueder" in Slack.

@t33chong
Copy link
Contributor

Could you add the following line to the top of your lita_config.rb and see if it helps?

Encoding.default_external = Encoding.default_internal = Encoding::UTF_8

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants