Multibyte Character Surport for Python

Martin v. Loewis martin at v.loewis.de
Sun May 12 11:08:06 EDT 2002


"Stephen J. Turnbull" <stephen at xemacs.org> writes:

> The content of what you wrote is identical to what I wrote.  It's
> optional, if you have good reason not to do so.  The behavior of
> 
>             u"a".encode("UTF-16") + u"b".encode("UTF-16")
> 
> versus
> 
>                         u"ab".encode("UTF-16")
> 
> is quite sufficient reason, to my mind.

No. To my mind, this is good reason to not use UTF-16 altogether, but
be specific about the endianness: explicit is better than implicit.

Why does it help to have "UTF-16" to be a synonym to either "UTF-16BE"
or "UTF-16LE", but not telling anybody what it is a synonym to?

Regards,
Martin



More information about the Python-list mailing list