[I18n-sig] IANA names for character set encodings?

M.-A. Lemburg mal@lemburg.com
Sat, 09 Feb 2002 12:53:01 +0100

Fredrik Lundh wrote:
> mal wrote:
> > How large would such an alias dictionary be ?
> >
> > Looking at the IANA listing it seems rather lengthy. What I'm
> > worried about is that Python startup time will get worse for
> > programs using codecs (I sometimes wish Python had a builtin
> > on-disk registry where we could put static data like this).
> why split it up in two parts; put common aliases in one table
> (latin*, utf*, us-ascii, iso-8858, iso-2022, and perhaps some
> more), put that table inside __init__, and change the search
> function to:
>     1) look for a common aliases in the small table
>     2) try importing the module
>     3) if import fails, import "aliases", look it up in the
>        big table, and try again
> in this way, people who use the "true" names and commonly
> used aliases won't have to load the big alias table at all.

Good idea. Let's do it that way.

Marc-Andre Lemburg
CEO eGenix.com Software GmbH
Company & Consulting:                           http://www.egenix.com/
Python Software:                   http://www.egenix.com/files/python/