[Python-Dev] New Py_UNICODE doc
Shane Hathaway
shane at hathawaymix.org
Sun May 8 18:25:07 CEST 2005
M.-A. Lemburg wrote:
> All this talk about UTF-16 vs. UCS-2 is not very useful
> and strikes me a purely academic.
>
> The reference to possibly breakage by slicing a Unicode and
> breaking a surrogate pair is valid, the idea of UCS-4 being
> less prone to breakage is a myth:
Fair enough. The original point is that the documentation is unclear
about what a Py_UNICODE[] contains. I deduced that it contains either
UCS2 or UCS4 and implemented accordingly. Not only did I guess wrong,
but others will probably guess wrong too. Something in the docs needs
to spell this out.
Shane
More information about the Python-Dev
mailing list