A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2002-September/028936.html below:

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

[Python-Dev] How to add an encoding alias? [Python-Dev] How to add an encoding alias?Guido van Rossum guido@python.org
Thu, 26 Sep 2002 15:13:15 -0400
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/)



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4