@@ -73,36 +73,6 @@ static struct _inittab extensions[] = {
73
73
static wchar_t * log_pathw = NULL ;
74
74
#endif
75
75
76
- #if defined(_WIN32 ) && PY_VERSION_HEX < 0x03060000
77
- static int supports_code_page (UINT cp ) {
78
- if (cp == 0 ) {
79
- cp = GetACP ();
80
- }
81
-
82
- /* Shortcut, because we know that these encodings are bundled by default--
83
- * see FreezeTool.py and Python's encodings/aliases.py */
84
- if (cp != 0 && cp != 1252 && cp != 367 && cp != 437 && cp != 850 && cp != 819 ) {
85
- const struct _frozen * moddef ;
86
- char codec [100 ];
87
-
88
- /* Check if the codec was frozen into the program. We can't check this
89
- * using _PyCodec_Lookup, since Python hasn't been initialized yet. */
90
- PyOS_snprintf (codec , sizeof (codec ), "encodings.cp%u" , (unsigned int )cp );
91
-
92
- moddef = PyImport_FrozenModules ;
93
- while (moddef -> name ) {
94
- if (strcmp (moddef -> name , codec ) == 0 ) {
95
- return 1 ;
96
- }
97
- ++ moddef ;
98
- }
99
- return 0 ;
100
- }
101
-
102
- return 1 ;
103
- }
104
- #endif
105
-
106
76
/**
107
77
* Sets the main_dir field of the blobinfo structure, but only if it wasn't
108
78
* already set.
@@ -408,19 +378,6 @@ int Py_FrozenMain(int argc, char **argv)
408
378
}
409
379
#endif
410
380
411
- #if defined(MS_WINDOWS ) && PY_VERSION_HEX >= 0x03040000 && PY_VERSION_HEX < 0x03060000
412
- if (!supports_code_page (GetConsoleOutputCP ()) ||
413
- !supports_code_page (GetConsoleCP ())) {
414
- /* Revert to the active codepage, and tell Python to use the 'mbcs'
415
- * encoding (which always uses the active codepage). In 99% of cases,
416
- * this will be the same thing anyway. */
417
- UINT acp = GetACP ();
418
- SetConsoleCP (acp );
419
- SetConsoleOutputCP (acp );
420
- Py_SetStandardStreamEncoding ("mbcs" , NULL );
421
- }
422
- #endif
423
-
424
381
Py_FrozenFlag = 1 ; /* Suppress errors from getpath.c */
425
382
Py_NoSiteFlag = 0 ;
426
383
Py_NoUserSiteDirectory = 1 ;
0 commit comments