-
Notifications
You must be signed in to change notification settings - Fork 239
Add JS_ToCStringTwoByte #1293
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
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.) |
saghul
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to UCS
|
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?