From: Benjamin Peterson Date: Fri, 8 Sep 2017 21:30:07 +0000 (-0700) Subject: delete dead locale initialization code for windows (#3461) X-Git-Tag: v3.7.0a1~94 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=db610e909b07ced88e73fb0c23e04eed0d4e1b0d;p=thirdparty%2FPython%2Fcpython.git delete dead locale initialization code for windows (#3461) --- diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index b9f916bf39fa..caa324e3afa2 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -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");