How to add an encoding alias?
26 Sep
2002
26 Sep
'02
7:13 p.m.
In the spambayes project we encountered some mail samples that use an encoding name ('ansi-x3-4-1968') that's not in encodings/aliases.py. (At least not until I added it to CVS yesterday.) I'd like the spambayes code base to be compatible with Python 2.2.1, so I like to add this one to the list of aliases. Is there an official API to add an alias, or do I just have to write import encodings.aliases encodings.aliases.aliases['ansi-x3-4-1968'] = 'ascii' ??? (BTW, there's an alias 'ansi_x3.4_1986' for ASCII. Was the ASCII standard renewed in 1986, or is that simply because there are encoding designators out there in real life that contain a typo?) --Guido van Rossum (home page: http://www.python.org/~guido/)
7846
Age (days ago)
7854
Last active (days ago)
7 comments
2 participants
participants (2)
-
Guido van Rossum
-
M.-A. Lemburg