Unicode File

Tksee Lhsoh tksee at yahoo.com
Tue Jul 31 13:36:40 EDT 2001


Thanks Alex and Margin !

And I have one question.

How do you know the encoding of a file ?

Is it specific to the application which generated the file?


> I recommend to use codecs.open. You'll need to specify the encoding,
> e.g.
>
> s = codecs.open("unicode_filename",encoding="ucs-2").read()
>




More information about the Python-list mailing list