[Python-Dev] How to add an encoding alias?

M.-A. Lemburg mal@lemburg.com
Thu, 26 Sep 2002 21:43:37 +0200


Guido van Rossum wrote:
>   import encodings.aliases
>   encodings.aliases.aliases['ansi-x3-4-1968'] = 'ascii'

In order for the lookup to work, you have to replace hyphens
with underscores; see the top of aliases.py.

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
_______________________________________________________________________
eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,...
Python Consulting:                               http://www.egenix.com/
Python Software:                    http://www.egenix.com/files/python/