Top "Surrogate-pairs" questions

Unicode characters with code above 0xFFFF, are encoded in UTF-16 by pairs of 16-bit code units called **surrogate pairs**.

What is a "surrogate pair" in Java?

I was reading the documentation for StringBuffer, in particular the reverse() method. That documentation mentions something about surrogate pairs. What …

java unicode utf-16 surrogate-pairs
How to use unicode in Android resource?

I want to use this unicode character in my resource file. But whatever I do, I end with dalvikvm crash (…

android unicode utf-8 surrogate-pairs
What are the most common non-BMP Unicode characters in actual use?

In your experience which Unicode characters, codepoints, ranges outside the BMP (Basic Multilingual Plane) are the most common so far? …

unicode cjk codepoint surrogate-pairs astral-plane
C#: how to get first character of a string?

We already have a question about getting the first 16-bit char of a string. This includes the question code: MyString.…

c# string unicode utf-16 surrogate-pairs
How can I convert surrogate pairs to normal string in Python?

This is a follow-up to Converting to Emoji. In that question, the OP had a json.dumps()-encoded file with …

python python-3.x unicode surrogate-pairs
Java Can't Open a File with Surrogate Unicode Values in the Filename?

I'm dealing with code that does various IO operations with files, and I want to make it able to deal …

java file unicode filenames surrogate-pairs
JavaScript strings outside of the BMP

BMP being Basic Multilingual Plane According to JavaScript: the Good Parts: JavaScript was built at a time when Unicode was …

javascript unicode utf-16 surrogate-pairs astral-plane
How can I store UTF-16 characters in a Postgres database?

I am trying to store some text (e.g. č) in a Postgres database, however when retrieving this value, it appears …

.net postgresql encoding utf-16 surrogate-pairs
Handling Unicode surrogate values in Java strings

Consider the following code: byte aBytes[] = { (byte)0xff,0x01,0,0, (byte)0xd9,(byte)0x65, (byte)0x03,(byte)0x04, (byte)0x05, (byte)0…

java unicode surrogate-pairs
Python can't encode with surrogateescape

I have a problem with Unicode surrogates encoding in Python (3.4): >>> b'\xCC'.decode('utf-16_be', 'surrogateescape').encode(…

python unicode utf-16 surrogate-pairs