]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-102388: Add windows_31j to aliases for cp932 codec (#102389)
authorMasayuki Moriyama <masayuki.moriyama@miraclelinux.com>
Mon, 19 Feb 2024 08:01:35 +0000 (17:01 +0900)
committerGitHub <noreply@github.com>
Mon, 19 Feb 2024 08:01:35 +0000 (17:01 +0900)
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>
Doc/library/codecs.rst
Lib/encodings/aliases.py
Misc/NEWS.d/next/Library/2023-03-03-09-05-42.gh-issue-102389.ucmo0_.rst [new file with mode: 0644]

index 4617624686b1f3b3d0f16e852bce90a981a53474..25d4e24ac162a9b42584d7fadaa06993a19fd305 100644 (file)
@@ -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                         |
 +-----------------+--------------------------------+--------------------------------+
index d85afd6d5cf704b580a31be2ee79f5cdfe0247c1..6a5ca046b5eb6cd46e5caa6fc7d84513beb8d85a 100644 (file)
@@ -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 (file)
index 0000000..8c11567
--- /dev/null
@@ -0,0 +1 @@
+Add ``windows_31j`` to aliases for ``cp932`` codec