From: Serhiy Storchaka Date: Fri, 5 Jun 2026 07:58:20 +0000 (+0300) Subject: gh-62825: Fix encoding aliases "KS_C_5601-1987", "KS X 1001", etc (GH-150933) X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=45562c6f4f469e278a9c03c31c2cdadf8100d101;p=thirdparty%2FPython%2Fcpython.git gh-62825: Fix encoding aliases "KS_C_5601-1987", "KS X 1001", etc (GH-150933) They are now aliases of CP949 instead of EUC-KR. --- diff --git a/Lib/encodings/aliases.py b/Lib/encodings/aliases.py index e5e50630f33d..df4c230fbf9c 100644 --- a/Lib/encodings/aliases.py +++ b/Lib/encodings/aliases.py @@ -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 index 000000000000..95a4fb1c61d4 --- /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".