List of available codecs

Gilles Lenfant glenfant at NOSPAM.bigfoot.com
Fri May 9 09:49:57 EDT 2003


Many thanks Martin and Bengt

Bengt : your method does not return a list suitable for what I need. Sorry

--Gilles

"Martin v. Löwis" <martin at v.loewis.de> a écrit dans le message de news:
m3wuh2c8xb.fsf at mira.informatik.hu-berlin.de...
> bokr at oz.net (Bengt Richter) writes:
>
> > How close is
> >     import codecs
> >     codecList = [x for x in dir(codecs) if x.find('_decode')!=-1 or
x.find('_encode')!=-1]
> > ?
>
> Almost useless. People would expect "koi8-r", "iso-8859-2", "cp1252",
> etc in the result, as these are all strings you can pass to codecs.lookup.
>
> Regards,
> Martin
>





More information about the Python-list mailing list