STINNER Victor added the comment: > 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(-) ---------- nosy: +haypo _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23050> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com