Skip to content

Commit

Permalink
pythongh-102388: Add windows_31j to aliases for cp932 codec (python#1…
Browse files Browse the repository at this point in the history
…02389)

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>
  • Loading branch information
moriyama committed Feb 19, 2024
1 parent 177b9cb commit 1476ac2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Doc/library/codecs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
+-----------------+--------------------------------+--------------------------------+
Expand Down
1 change: 1 addition & 0 deletions Lib/encodings/aliases.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
'ms932' : 'cp932',
'mskanji' : 'cp932',
'ms_kanji' : 'cp932',
'windows_31j' : 'cp932',

# cp949 codec
'949' : 'cp949',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add ``windows_31j`` to aliases for ``cp932`` codec

0 comments on commit 1476ac2

Please sign in to comment.