]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.15] gh-62825: Fix encoding aliases "KS_C_5601-1987", "KS X 1001", etc (GH-150933...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 5 Jun 2026 11:41:22 +0000 (13:41 +0200)
committerGitHub <noreply@github.com>
Fri, 5 Jun 2026 11:41:22 +0000 (14:41 +0300)
They are now aliases of CP949 instead of EUC-KR.
(cherry picked from commit 45562c6f4f469e278a9c03c31c2cdadf8100d101)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/encodings/aliases.py
Misc/NEWS.d/next/Library/2026-06-04-23-10-31.gh-issue-62825.BtG_yQ.rst [new file with mode: 0644]

index e5e50630f33d14d0199af79ef1105f518c71891b..df4c230fbf9c4e46960177f21b47365faea431ce 100644 (file)
@@ -226,6 +226,12 @@ aliases = {
 
     # cp949 codec
     '949'                : 'cp949',
+    'korean'             : 'cp949',
+    'ksc5601'            : 'cp949',
+    'ks_c_5601'          : 'cp949',
+    'ks_c_5601_1987'     : 'cp949',
+    'ksx1001'            : 'cp949',
+    'ks_x_1001'          : 'cp949',
     'ms949'              : 'cp949',
     'uhc'                : 'cp949',
 
@@ -248,12 +254,6 @@ aliases = {
 
     # euc_kr codec
     'euckr'              : 'euc_kr',
-    'korean'             : 'euc_kr',
-    'ksc5601'            : 'euc_kr',
-    'ks_c_5601'          : 'euc_kr',
-    'ks_c_5601_1987'     : 'euc_kr',
-    'ksx1001'            : 'euc_kr',
-    'ks_x_1001'          : 'euc_kr',
     'cseuckr'            : 'euc_kr',
 
     # gb18030 codec
diff --git a/Misc/NEWS.d/next/Library/2026-06-04-23-10-31.gh-issue-62825.BtG_yQ.rst b/Misc/NEWS.d/next/Library/2026-06-04-23-10-31.gh-issue-62825.BtG_yQ.rst
new file mode 100644 (file)
index 0000000..95a4fb1
--- /dev/null
@@ -0,0 +1,2 @@
+Encodings "KS_C_5601-1987", "KS X 1001", etc are now aliases of "CP949"
+instead of "EUC-KR".