Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't encode UTF-8 #36

Open
Oreolek opened this issue Sep 3, 2019 · 1 comment
Open

don't encode UTF-8 #36

Oreolek opened this issue Sep 3, 2019 · 1 comment
Assignees
Labels
Milestone

Comments

@Oreolek
Copy link

Oreolek commented Sep 3, 2019

My terminal locale is UTF-8, my dfrotz puts plain Unicode (not ASCII) output, so the bot encodes Unicode twice into gibberish.

Here's a patch: src/MessageHandler.js, like 310

-    var final = stripAnsi(utf8.encode(this.compiledOutput));
+    var final = stripAnsi(this.compiledOutput);
@ava-cassiopeia
Copy link
Owner

Thanks for submitting a bug, this is good to know, and I will try to address it when I can.

The UTF-8 encoding is necessary for non-UTF-8 locale terminals, so there will need to be some sort of locale checking involved in this as well.

@ava-cassiopeia ava-cassiopeia self-assigned this Sep 3, 2019
@ava-cassiopeia ava-cassiopeia added this to the Version 1.0 milestone Sep 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants