diff options
author | Masayuki Moriyama <masayuki.moriyama@miraclelinux.com> | 2024-02-19 08:01:35 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-19 08:01:35 (GMT) |
commit | 1476ac2c58669b0a78d3089ebb9cc87955a1f5b0 (patch) | |
tree | 58b71ff0fc9b357bb9cbeb66ff5067f43265a75b | |
parent | 177b9cb52e57da4e62dd8483bcd5905990d03f9e (diff) | |
download | cpython-1476ac2c58669b0a78d3089ebb9cc87955a1f5b0.zip cpython-1476ac2c58669b0a78d3089ebb9cc87955a1f5b0.tar.gz cpython-1476ac2c58669b0a78d3089ebb9cc87955a1f5b0.tar.bz2 |
gh-102388: Add windows_31j to aliases for cp932 codec (#102389)
The charset name "Windows-31J" is registered in the IANA Charset Registry[1]
and is implemented in Python as the cp932 codec.
[1] https://www.iana.org/assignments/charset-reg/windows-31J
Signed-off-by: Masayuki Moriyama <masayuki.moriyama@miraclelinux.com>
-rw-r--r-- | Doc/library/codecs.rst | 3 | ||||
-rw-r--r-- | Lib/encodings/aliases.py | 1 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Library/2023-03-03-09-05-42.gh-issue-102389.ucmo0_.rst | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/Doc/library/codecs.rst b/Doc/library/codecs.rst index 4617624..25d4e24 100644 --- a/Doc/library/codecs.rst +++ b/Doc/library/codecs.rst @@ -1132,7 +1132,8 @@ particular, the following variants typically exist: +-----------------+--------------------------------+--------------------------------+ | cp875 | | Greek | +-----------------+--------------------------------+--------------------------------+ -| cp932 | 932, ms932, mskanji, ms-kanji | Japanese | +| cp932 | 932, ms932, mskanji, ms-kanji, | Japanese | +| | windows-31j | | +-----------------+--------------------------------+--------------------------------+ | cp949 | 949, ms949, uhc | Korean | +-----------------+--------------------------------+--------------------------------+ diff --git a/Lib/encodings/aliases.py b/Lib/encodings/aliases.py index d85afd6..6a5ca04 100644 --- a/Lib/encodings/aliases.py +++ b/Lib/encodings/aliases.py @@ -209,6 +209,7 @@ aliases = { 'ms932' : 'cp932', 'mskanji' : 'cp932', 'ms_kanji' : 'cp932', + 'windows_31j' : 'cp932', # cp949 codec '949' : 'cp949', diff --git a/Misc/NEWS.d/next/Library/2023-03-03-09-05-42.gh-issue-102389.ucmo0_.rst b/Misc/NEWS.d/next/Library/2023-03-03-09-05-42.gh-issue-102389.ucmo0_.rst new file mode 100644 index 0000000..8c11567 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2023-03-03-09-05-42.gh-issue-102389.ucmo0_.rst @@ -0,0 +1 @@ +Add ``windows_31j`` to aliases for ``cp932`` codec |