In Java and Unicode code point

Java can be used \ uXXXX Unicode character expressed, for example, S = String "\ u00X1";
XXXX must be 4-bits code point U + 1D546 character, represented by two coding units required, e.g. String t = "\ uD835 \ uDD46 "; and if they are directly written as" \ u1D546 ", said the" \ u1D54 "and" 6 "of these two characters.

Most string, length and codePointCount these two values ​​are equal. Some special characters are not and so on. For example the character U + 1D546, which is the point code 1D546, two coding units, Java can be written as String s = "\ uD835 \ uDD46"; at which time length is 2, codePointCount 1.

Guess you like

Origin www.cnblogs.com/tuzkee/p/11605048.html