character encoding conversion

"Martin v. Löwis" martin at v.loewis.de
Mon Dec 13 18:02:48 EST 2004


Max M wrote:
> A smiple way to try out different encodings in a given order:

The loop is fine - although ('UTF-8', 'Latin-1', 'ASCII') is
somewhat redundant. The 'ASCII' case is never considered, since
Latin-1 effectively works as a catch-all encoding (as all byte
sequences can be considered Latin-1 - whether they are meaningful
data is a different question).

Regards,
Martin



More information about the Python-list mailing list