File tree Expand file tree Collapse file tree 2 files changed +8
-17
lines changed
Expand file tree Collapse file tree 2 files changed +8
-17
lines changed Original file line number Diff line number Diff line change @@ -156,23 +156,6 @@ def search_function(encoding):
156156codecs .register (search_function )
157157
158158if sys .platform == 'win32' :
159- # bpo-671666, bpo-46668: If Python does not implement a codec for current
160- # Windows ANSI code page, use the "mbcs" codec instead:
161- # WideCharToMultiByte() and MultiByteToWideChar() functions with CP_ACP.
162- # Python does not support custom code pages.
163- def _alias_mbcs (encoding ):
164- try :
165- import _winapi
166- ansi_code_page = "cp%s" % _winapi .GetACP ()
167- if encoding == ansi_code_page :
168- import encodings .mbcs
169- return encodings .mbcs .getregentry ()
170- except ImportError :
171- # Imports may fail while we are shutting down
172- pass
173-
174- codecs .register (_alias_mbcs )
175-
176159 from ._win_cp_codecs import create_win32_code_page_codec
177160
178161 def win32_code_page_search_function (encoding ):
Original file line number Diff line number Diff line change 204204 'csibm869' : 'cp869' ,
205205 'ibm869' : 'cp869' ,
206206
207+ # cp874 codec
208+ '874' : 'cp874' ,
209+ 'ms874' : 'cp874' ,
210+ 'windows_874' : 'cp874' ,
211+
207212 # cp932 codec
208213 '932' : 'cp932' ,
209214 'ms932' : 'cp932' ,
241246 'ks_c_5601_1987' : 'euc_kr' ,
242247 'ksx1001' : 'euc_kr' ,
243248 'ks_x_1001' : 'euc_kr' ,
249+ 'cseuckr' : 'euc_kr' ,
244250
245251 # gb18030 codec
246252 'gb18030_2000' : 'gb18030' ,
399405 'iso_8859_8' : 'iso8859_8' ,
400406 'iso_8859_8_1988' : 'iso8859_8' ,
401407 'iso_ir_138' : 'iso8859_8' ,
408+ 'iso_8859_8_i' : 'iso8859_8' ,
409+ 'iso_8859_8_e' : 'iso8859_8' ,
402410
403411 # iso8859_9 codec
404412 'csisolatin5' : 'iso8859_9' ,
You can’t perform that action at this time.
0 commit comments