Pythjon and XML

Fredrik Lundh effbot at telia.com
Wed Feb 2 04:07:06 EST 2000


<F note="mailed and posted">

kamindra at my-deja.com wrote:
> just a quick question on using Python with XML. Does Python handle the
> extended character sets? That is does it handle UTF16 etc with its
> native function libraries or I have to do something special like in C -
> char and wchar.

quick answer: the built-in string type only handles 8-bit
characters, and most XML parsers (e.g. xmllib) cannot
handle anything that doesn't use an 8-bit encoding.  in
other words, ASCII, ISO Latin, UTF-8 (etc) works fine,
but 16-bit encodings don't.

this will be fixed in Python 1.6.

</F>





More information about the Python-list mailing list