We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b4e5ed0 commit c8741e5Copy full SHA for c8741e5
src/String.cpp
@@ -1418,8 +1418,11 @@ String String::fromCharCode( int c )
1418
else
1419
{
1420
#ifdef HX_SMART_STRINGS
1421
- if (IsUtf16Surrogate(c)||c>=0x110000)
1422
- c = 0xFFFD;
+ // Leave Utf16 surrogate handling up to the application - as far as hxcpp is concerned
+ // they are single characters. ie, mirror charAt.
1423
+ // If the application does not group them as a pair, then it may not be possible to convert to utf8.
1424
+ //if (IsUtf16Surrogate(c))
1425
+ // hx::Throw(HX_CSTRING("Invalid unpaired surrogate code"));
1426
#endif
1427
1428
int group = c>>10;
0 commit comments