This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients ishimoto, lemburg, loewis, methane, r.david.murray, serhiy.storchaka, t2y, vstinner
Date 2014-12-15.16:45:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1418661957.65.0.00216039629905.issue23050@psf.upfronthosting.co.za>
In-reply-to
Content
> These character encodings are legacy, but are still used.

Do you have an idea of how many users still have documents stored or exchanged using these encodings? The patch is not trivial, the legacy japanese codecs are complex and so error prone :-/

For previous requests to add new codecs, we closed issues as wontfix and we suggested to share the codecs at the Python Cheeseshop (PyPI). Here it's more complex because C code is modified to implement the new encodings.

$ diffstat issue23050_13417.diff 
 Doc/library/codecs.rst                   |   16 
 Lib/encodings/aliases.py                 |   26 
 Lib/test/test_codecencodings_iso2022.py  |   59 +
 Lib/test/test_codecs.py                  |    2 
 Lib/test/test_multibytecodec.py          |    6 
 Lib/test/test_xml_etree.py               |    4 
 Modules/cjkcodecs/_codecs_iso2022.c      |  718 ++++++++++++++++++-----
 Modules/cjkcodecs/_codecs_jp.c           |  305 +++++++++
 Modules/cjkcodecs/mappings_jp.h          |  950 ++++++++++++++++++++++---------
 Modules/cjkcodecs/multibytecodec.h       |   11 
 Python/importlib.h                       |  860 ++++++++++++++--------------
 b/Lib/encodings/cp50220.py               |   39 +
 b/Lib/encodings/cp50221.py               |   39 +
 b/Lib/encodings/cp50222.py               |   39 +
 b/Lib/encodings/cp51932.py               |   39 +
 b/Lib/encodings/eucjp_ms.py              |   39 +
 b/Lib/encodings/iso2022_jp_ms.py         |   39 +
 b/Lib/test/cjkencodings/cp50220-utf8.txt |   30 
 b/Lib/test/cjkencodings/cp50220.txt      |   30 
 b/Modules/cjkcodecs/mappings_cp50220_k.h |   31 +
 20 files changed, 2452 insertions(+), 830 deletions(-)
History
Date User Action Args
2014-12-15 16:45:57vstinnersetrecipients: + vstinner, lemburg, loewis, ishimoto, r.david.murray, methane, serhiy.storchaka, t2y
2014-12-15 16:45:57vstinnersetmessageid: <1418661957.65.0.00216039629905.issue23050@psf.upfronthosting.co.za>
2014-12-15 16:45:57vstinnerlinkissue23050 messages
2014-12-15 16:45:57vstinnercreate