]> granicus.if.org Git - python/commitdiff
delete dead locale initialization code for windows (#3461)
authorBenjamin Peterson <benjamin@python.org>
Fri, 8 Sep 2017 21:30:07 +0000 (14:30 -0700)
committerGitHub <noreply@github.com>
Fri, 8 Sep 2017 21:30:07 +0000 (14:30 -0700)
Python/pylifecycle.c

index b9f916bf39fac3a06fe49569b262402b02918e25..caa324e3afa25066c5e7193df97b49c5b2988657 100644 (file)
@@ -264,11 +264,7 @@ error:
 static char*
 get_locale_encoding(void)
 {
-#ifdef MS_WINDOWS
-    char codepage[100];
-    PyOS_snprintf(codepage, sizeof(codepage), "cp%d", GetACP());
-    return get_codec_name(codepage);
-#elif defined(HAVE_LANGINFO_H) && defined(CODESET)
+#if defined(HAVE_LANGINFO_H) && defined(CODESET)
     char* codeset = nl_langinfo(CODESET);
     if (!codeset || codeset[0] == '\0') {
         PyErr_SetString(PyExc_ValueError, "CODESET is not set or empty");