Add JS_ToCStringTwoByte#1293
Conversation
012c490 to
45b7595
Compare
|
TwoByte is not ideal agreed, I like USC but does that imply some guarantees for missing surrogate pairs? |
|
The failing test was this (on meson on ubuntu-latest (default debug, mimalloc)): That's the |
Nothing that JS strings don't already promise (i.e., not much.) |
|
Why not simply Or possibly |
Unmatched surrogate pairs. JS strings that have them are not legal UTF-16. That was the reason for the TwoByte moniker, to convey to users they can't assume well-formed UTF-16.
To seasoned C programmers that name suggests it's using Half tongue in cheek (half, because I do like to go to Heaven); wdyt, @saghul? |
|
🤣 I think UTF16 with docs or UCS as the part in the name works for me. |
|
Okay, here's the plan: I'm going to merge this PR and then open a new one that |
See discussion in quickjs-ng#1293.
Refs: #992
I'm kind of starting to hate that whole TwoByte name scheme. @chqrlie suggested
16Bits, I'm thinking of renaming toUCSmyself. Thoughts?