https://github.com/python/cpython/commit/675ed8a7490f221f228d7bc75263e4195e6139a4
commit: 675ed8a7490f221f228d7bc75263e4195e6139a4
branch: 3.15
author: Miss Islington (bot) <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2026-06-05T14:41:22+03:00
summary:

[3.15] gh-62825: Fix encoding aliases "KS_C_5601-1987", "KS X 1001", etc 
(GH-150933) (GH-150946)

They are now aliases of CP949 instead of EUC-KR.
(cherry picked from commit 45562c6f4f469e278a9c03c31c2cdadf8100d101)

Co-authored-by: Serhiy Storchaka <[email protected]>

files:
A Misc/NEWS.d/next/Library/2026-06-04-23-10-31.gh-issue-62825.BtG_yQ.rst
M Lib/encodings/aliases.py

diff --git a/Lib/encodings/aliases.py b/Lib/encodings/aliases.py
index e5e50630f33d14..df4c230fbf9c4e 100644
--- a/Lib/encodings/aliases.py
+++ b/Lib/encodings/aliases.py
@@ -226,6 +226,12 @@
 
     # 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 @@
 
     # 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
index 00000000000000..95a4fb1c61d4c3
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2026-06-04-23-10-31.gh-issue-62825.BtG_yQ.rst
@@ -0,0 +1,2 @@
+Encodings "KS_C_5601-1987", "KS X 1001", etc are now aliases of "CP949"
+instead of "EUC-KR".

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to