[Python-Dev] Encoding detection in the standard library? (original) (raw)
Christian Heimes lists at cheimes.de
Mon Apr 21 18:54:47 CEST 2008
- Previous message: [Python-Dev] Encoding detection in the standard library?
- Next message: [Python-Dev] Encoding detection in the standard library?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
David Wolever schrieb:
Is there some sort of text encoding detection module is the standard library? And, if not, is there any reason not to add one?
You cannot detect the encoding unless it's explicitly defined through a header (e.g. the UTF BOM). It's technically impossible. The best you can do is an educated guess.
Christian
- Previous message: [Python-Dev] Encoding detection in the standard library?
- Next message: [Python-Dev] Encoding detection in the standard library?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]