Python's handling of unicode surrogates
rridge at caffeine.csclub.uwaterloo.ca
Mon Apr 23 19:25:55 CEST 2007
Ross Ridge writes:
> The Unicode standard doesn't require that you support surrogates, or
> any other kind of character, so no you wouldn't be lying.
<martin at v.loewis.de> wrote:
> There is the notion of Unicode implementation levels, and each of them
> does include a set of characters to support.
There are different levels of implemtentation for ISO 10646, but not
> It is probably an interpretation issue what "supported" means.
The strongest claim to support Unicode that you can meaningfully make
is that of conformance to the Unicode standard. The Unicode standard's
conformance requirements make it explicit that you don't need to support
any particular character:
C8 A process shall not assume that it is required to interpret
any particular coded character representation.
. Processes that interpret only a subset of Unicode characters
are allowed; there is no blanket requirement to interpret
all Unicode characters.
> Python clearly supports Unicode level 1 (if we leave alone the issue
> that it can't render all these characters out of the box, as it doesn't
> ship any fonts);
It's not at all clear to to me that Python does support ISO 10646's
implementation level 1, if only because I don't, and I assume you don't,
have a copy of ISO 10646 available to verify what the requirements
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rridge at csclub.uwaterloo.ca
More information about the Python-list