Guessing _charset for MIMEText ?

Robert kxroberto at googlemail.com
Wed Jan 18 11:55:31 EST 2006


How do I best guess the right (non-UTF, 8bit) default  _charset for
MIMEText on an arbitrary computer?

Windows default encoding is quasi : 'mbcs'   . No information

>>> locale.getdefaultlocale()[1]   #delivers for example:
'cp1252'

but I guess 'cp1252'  is not recognized commonly by email-readers, but
'ISO-8859-1' or 'Windows-1252' are usually used for that area.

Robert

PS: side-question: why is there a  latin_1.py and a iso8859_1.py  in
lib/encodings ? Shouldn't they be the same?




More information about the Python-list mailing list