Closed CharlieFRuan closed 2 months ago
This PR fixes passing Javascript string with special characters to C for web runtime.
Take the upside-down exclamation mark ¡ as an example. This should encode to \xC2\xA1 according to https://mothereff.in/utf-8#%C2%A1 and other sources:
¡
\xC2\xA1
OldStringToUint8Array("¡") --> [161, 0] NewStringToUint8Array("¡") --> [194, 161, 0]
This PR fixes passing Javascript string with special characters to C for web runtime.
Take the upside-down exclamation mark
¡
as an example. This should encode to\xC2\xA1
according to https://mothereff.in/utf-8#%C2%A1 and other sources: