-
Notifications
You must be signed in to change notification settings - Fork 28
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
Force UTF-8 encoding on incoming events #16
Conversation
Hi. Thanks for the contribution. i'm fine with forcing |
Apparently with older Rubies (pre 2.1), The more modern solution I think would use In my applications I use |
Ruby 2.1 is no longer maintained, so I'm ok to drop support of it. Could you add a testcase please? Then I'll check what browsers do in this case. |
Sure thing, though I'm not sure how to run the tests. Is this standard rspec? With I may not get back to this until the new year, FYI. Thanks for the help! |
Never mind, I got the tests to run, and they pass :) I'll add a test case when I return January 1. |
If the "chunk" contains characters that aren't UTF-8, the library will fail with "invalid byte sequence in UTF-8 (ArgumentError)". This patch fixes this and ensures we work only with UTF-8.
@francois2metz Not sure if you were waiting on a ping. I added a test case :) No rush to merge obviously, just letting you know. |
Hi. Thanks for letting me know. I'll take a look later. |
Thanks for the patch! 💛 💜 💙 💚 |
I released the version 0.3.1 with the fix. |
If the "chunk" contains characters that aren't UTF-8, the library will fail with "invalid byte sequence in UTF-8 (ArgumentError)". This patch fixes this and ensures we work only with UTF-8.