Wrong conversion of secondary set of emojis (UCS2)
Closed this issue Β· 1 comments
omaralvaradoluna commented
when i run the punycode.ucs2.decode
("This is a message with emoji π β½ βπΈ π) π π π π π π π")
i'm obtaining numbers greater than 0xFFFF (65536) . That is wrong because we need to convert between code points and surrogate pairs as document https://mathiasbynens.be/notes/javascript-encoding
The inverse function runs without problem.
It looks like it is happening with secondary set of emojis in the document.
mathiasbynens commented
i'm obtaining numbers greater than 0xFFFF (65536) .
Thatβs the point: https://github.com/bestiejs/punycode.js#punycodeucs2decodestring
What output would you expect?