UCS-2 or UTF-16. As of ES2015, string methods and regular expression flags have been added to the language that permit handling strings from an encoding-agnostic perspective. Swift, Apple's preferred application language, used UTF-16 to store strings until version 5 which switched to UTF-8. Quite a few languages make the encoding part of the string object, and thus store and support a large set of encodings including UTF-16. Most consider UTF-16 and UCS-2 to be different encodings. Examples are the PHP language and MySQL. A method to determine what encoding a system is using internally is to ask for the "length" of string continaing a single non-BMP character. If the length is 2 then UTF-16 is being used. 4 indicates UTF-8. 3 or 6 may indicate CESU-8. 1 may indicate UTF-32, but more likely indicates the language decodes the string to code points before measuring the "length". In many languages, quoted strings need a new syntax for quoting non-BMP characters, as the C-style "\uXXXX" syntax explicitly limits itself to 4 hex digits. The following examples illustrate the syntax for the non-BMP character : The most common (C++, C#, D, and several other languages) is an upper-case 'U' with 8'' hex digits such as "\U0001D11E". Java 7 regular expressions, ICU, and Perl, use "\x{1D11E}". ECMAScript 2015 (JavaScript) uses "\u{1D11E}". In many other cases (such as Java outside of regular expressions), the only way to get non-BMP characters is to enter the surrogate halves individually: "\uD834\uDD1E". See also Comparison of Unicode encodings Plane (Unicode) UTF-8 CESU-8 UTF-32 Notes References External links A very short algorithm for determining the surrogate pair for any code point Unicode Technical Note #12: UTF-16 for Processing Unicode FAQ: What is the difference between UCS-2 and UTF-16? Unicode Character Name Index : UTF-16, an encoding of ISO 10646 java.lang.String documentation, discussing surrogate handling Encodings Character encoding Unicode Transformation Formats Computer-related introductions in 1991