[Python-Dev] utf-8 issue thread question

Fredrik Lundh fredrik@pythonware.com
Wed, 11 Sep 2002 02:24:53 +0200

Brett Cannon wrote:

> The following is my current rough summary explanation for what a =
> is.  Can someone please correct it as needed?

needed, indeed.

it's 2.30 am over here, so I'm not going to try to explain this myself,
but some random googling brought up this page:

    The code points U+D800 through U+DB7F are reserved as High =
    and the code points U+DC00 through U+DFFF are reserved as Low =
    Each code point in [the full 20-bit unicode character space] maps to =
a pair of
    16-bit code points comprising a High Surrogate followed by a Low =
    Thus, for example, the Gothic letter AHSA has the UTF-32 value of =
    which maps to the surrogate pair U+D800 and U+DF30. That is to say, =
in the
    16-bit encoding of Unicode (UTF-16), the Gothic letter AHSA is =
    by two consecutive 16-bit code points (U+D800 and U+DF30), whereas =
in the
    32-bit encoding of Unicode (UTF-32), the same letter is represented =
by a
    single 32-bit value (U+10330).