Re: IANA names for character set encodings?

"M.-A. Lemburg" <[email protected]>
Newsgroups gmane.comp.python.internationalization
Organization eGenix.com Software GmbH
Message-ID <[email protected]>
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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.