WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Truncated strings mangle non-BMP Unicode characters  #41

@franrogers

Description

@franrogers

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) 'ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð��©ð

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions