Nicholas Bastin wrote:
> I'm not sure the Python documentation is the place to teach someone
> about unicode.  The ISO 10646 pretty clearly defines UCS-2 as only
> containing characters in the BMP (plane zero).  On the other hand, I
> don't know why python lets you choose UCS-2 anyhow, since it's almost
> always not what you want.

It certainly is, in most cases. On Windows, it is the only way to
get reasonable interoperability with the platform's WCHAR (i.e.
just cast a Py_UNICODE* into a WCHAR*).

To a limited degree, in UCS-2 mode, Python has support for surrogate
characters (e.g. in UTF-8 codec), so it is not "pure" UCS-2, but
this is a minor issue.

Regards,
Martin
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to