Encoded file

Skip Montanaro skip at pobox.com
Wed Mar 17 17:33:14 EST 2004


    Zhi> Could I ask you, how can I know a file is encoded as 'UTF-8',
    Zhi> 'UTF-16' or something else?

In general you can't tell.  I'm not aware of any filesystems which maintain
encoding information for individual files.  You have to know or guess.  Some
encodings carry clues (BOM, etc), but in general you have to figure it out.

Skip





More information about the Python-list mailing list