I'd like to write unicode literal U+10428 in Java. http://www.marathon-studios.com/unicode/U10428/Deseret_Small_Letter_Long_I
I tried with '\u10428' and it doesn't compile.
I'd like to write unicode literal U+10428 in Java. http://www.marathon-studios.com/unicode/U10428/Deseret_Small_Letter_Long_I
I tried with '\u10428' and it doesn't compile.
Because Java went full-out unicode when people thought 64K are enough for everyone (Where did one hear such before?), they started out with UCS-2 and later upgraded to UTF-16.
But they never bothered to add an escape sequence for unicode characters outside the BMP.
Thus, your only recourse is manually recoding to a UTF-16 surrogate-pair and using two UTF-16 escapes.
Your example codepoint
U+10428
is"\uD801\uDC28"
.I used this site for the recoding: http://rishida.net/tools/conversion/
Quote from the docs: