Trouble with source-code encoding
Alan Kennedy
alanmk at hotmail.com
Fri Sep 12 06:33:43 EDT 2003
Fernando Rodriguez wrote:
> However, the pep doesn't list the name of valid encodings. What's
> the name for west european encoding?
Unfortunately, there is no way, from code, to get a list of valid
encodings.
You can get a good idea of supported encodings, their names and
various aliases, by looking at the source of
Lib/encodings/aliases.py
which gives the following list of possible names for the "latin_1"
codec
'8859'
'cp819'
'csisolatin1'
'ibm819'
'iso8859'
'iso_8859_1'
'iso_8859_1_1987'
'iso_ir_100'
'l1'
'latin'
'latin1'
Any of those should work as your script encoding.
--
alan kennedy
-----------------------------------------------------
check http headers here: http://xhaus.com/headers
email alan: http://xhaus.com/mailto/alan
More information about the Python-list
mailing list