[Python-Dev] unicode/string asymmetries
Martin v. Loewis
martin@v.loewis.de
Wed, 9 Jan 2002 20:36:58 +0100
> Why would you have to specify the encoding if what you want is the normal,
> standard encoding?
Well, because utf-16-le definitely is *not* the normal, standard
encoding. It is only the right thing if the C type is WCHAR[], which
is a Microsoft invention.
> Or, to rephrase the question, why do C programmers only have to
> s/char/wchar_t/, add a "w" to the front of the routine names and a u
> in front of the string constants, whereas Python programmers are now
> suddenly expected to learn all this mumbo-jumbo about encodings and
> such?
That is definitely not the only thing that C programmers have to
do. They need to invoke conversion functions all the time. Plus, they
are faced with the problem that, when integrating different
Unicode-supporting libraries, they have to convert forth and back
between different Unicode types.
Regards,
Martin