M.-A. Lemburg <mal <at> egenix.com> writes:
> 
> It's rather common to exchange text files between users... and
> in form of XML and CSV files, these also tend to get used as
> input for programs every now and then 

For XML files, encoding should be taken care of by the XML layer, not the IO
layer. That is, they will be read and written as binary files.
For CSV files, the situation is in my experience hopeless. Even on an UTF-8
system some software will interpret them as latin-1 by default. The "solution"
I've come with is to first decode them as UTF-8 and fall back on latin-1 if it
fails.

Regards

Antoine.


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to