Surrogate pair characters are interpreted as a single character by combining a "high surrogate" and a "low surrogate."
Therefore, for example, if you use the substring(0, 1) method on a String variable containing a single surrogate pair to extract only the high surrogate, it will not be interpreted as a valid surrogate pair, and the character cannot be retrieved correctly.
When handling surrogate pair characters using methods such as substring, the implementation must retrieve two values (the high and low surrogates) for a single character.
In the example above, this should be implemented as substring(0, 2).
000395737

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.