[Python-Dev] Improve open() to support reading file starting with an unicode BOM (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Sat Jan 9 04:07:12 CET 2010
- Previous message: [Python-Dev] Improve open() to support reading file starting with an unicode BOM
- Next message: [Python-Dev] Improve open() to support reading file starting with an unicode BOM
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
MRAB wrote:
Maybe there should also be a way of determining what encoding it decided it was, so that you can then write a new file in that same encoding.
I thought of that question as well - the f.encoding attribute on the opened file should be sufficient.
Cheers, Nick.
-- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
- Previous message: [Python-Dev] Improve open() to support reading file starting with an unicode BOM
- Next message: [Python-Dev] Improve open() to support reading file starting with an unicode BOM
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]