Python and UTF-8
Matthias Huening
mhuening at zedat.fu-berlin.de
Thu Jan 3 07:39:31 EST 2002
martin at v.loewis.de (Martin v. Loewis) wrote in
news:m3itak5to0.fsf at mira.informatik.hu-berlin.de:
>
> You have to know the encoding the data is currently, say
> current_encoding. Then, converting it into UTF-8, you write
>
> data = unicode(data, current_encoding).encode('utf-8')
>
Yes, but what if I don't know?
I have been playing around with Unicode/Python/Tkinter, but I just don't
get is... Seems like I need some help on Unicode...
Would there be a good tutorial or book on this topic which answers
questions like:
How does Python handle Unicode-files?
How does sorting work with Unicode?
Can I use locales with Unicode (e.g. to sort words according to the
German convention?) How?
How to use regular expressions with Unicode?
etc.
Thanks, Matthias
More information about the Python-list
mailing list