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

Truncated strings mangle non-BMP Unicode characters #41

Open
franrogers opened this issue Jul 1, 2014 · 0 comments
Open

Truncated strings mangle non-BMP Unicode characters #41

franrogers opened this issue Jul 1, 2014 · 0 comments

Comments

@franrogers
Copy link

If a string result exceeds what can fit in a single line of chat, truncating the end, non-BMP Unicode characters (i.e., surrogate pairs) get mangled. Por ejemplo:

[21:39:23]  <franny>     >> (function () { var s = ''; for (var i = 0; i < 108; i++) s = s + '\uD83D\uDCA9'; return s })();
[21:39:23]  <ecmabot-wm>     (string) '💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩'
[21:39:25]  <franny>     >> (function () { var s = ''; for (var i = 0; i < 109; i++) s = s + '\uD83D\uDCA9'; return s })();
[21:39:26]  <ecmabot-wm>     (string) 'ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant