You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to parse a string which contains this character escaped as UTF-16, but the result is incorrect. I debugged it a little bit and it seems that the issue is due to submitting the UTF-16 units to unicodeToUtf8 one-by-one, rather than decoding the unicode codepoint and then submitting that to unicodeToUtf8.
I think that the form in which a single character is represented by 2 unicode points is the Modified utf8 with surrogate pairs that is used when converting from utf16 to utf8.
I'm still trying to understand if that is the case and, if so, if there's some way to group those characters without refactoring the one-by-one logic (this problem should affect strings, templates and variabile names).
I'm very busy right now but i will try to work on it in some weeks.
I've just released a new version with surrogate pairs support in strings and templates. No need to change variables name parsing since they are not allowed as variable names. Thank you for reporting!
I'm trying to parse a string which contains this character escaped as UTF-16, but the result is incorrect. I debugged it a little bit and it seems that the issue is due to submitting the UTF-16 units to
unicodeToUtf8
one-by-one, rather than decoding the unicode codepoint and then submitting that tounicodeToUtf8
.Here is a code that reproduces the problem:
I tested this with PHP 7.4 and the latest master (b33fa0d).
The text was updated successfully, but these errors were encountered: