Python and UTF-8

Martin von Loewis loewis at
Thu Jan 3 18:29:05 CET 2002

Giorgi Lekishvili <gleki at> writes:

> I wonder if you find time to give me a hint where can I get the
> information on which encoding schemes are currently suported in
> Python...

Currently, there is no programmatic way to find all supported
encodings. In general, take the IANA registry of character sets at

as a starting point, and use the names in that registry (if there is a
preferred MIME name as an alias, use that, otherwise use the Name, not
an Alias).

To get an idea of what is supported, see


For a module in this directory, you can use alternative
spellings, like "foo-bar", or "foo_BAR" (i.e. all of ISO-8859-1,
iso-8859-1, and ISO_8859-1 refer to the same encoding).

If there is an encoding that is not supported by Python which you
need, please report it as a bug at Meanwhile,
you may find the additional codecs at
useful. In particular, on Unix, the iconv codec will give you access
to many additional encodings (depending on your operating system).


More information about the Python-list mailing list