How to get an encoding a value?

Diez B. Roggisch deetsNOSPAM at
Sat Oct 23 13:42:02 CEST 2004

Alex Martelli wrote:

> Yeah, but it doesn't work.  iso-8859-x would break for any value of x;
> can't tell this way if it was latin-1, or any of the others...

you and peter are right of cours - first try should be utf-8. And of course,
a one-byte-based encoding will always match. I know that there are tools
out there like recode that try to make an educated guess, by taking the
context o non-ascii chars into account and the like.

Diez B. Roggisch

More information about the Python-list mailing list