mirror of
https://github.com/python/cpython.git
synced 2025-09-09 02:11:51 +00:00
delete dead locale initialization code for windows (#3461)
This commit is contained in:
parent
4c81401b3a
commit
db610e909b
1 changed files with 1 additions and 5 deletions
|
@ -264,11 +264,7 @@ error:
|
||||||
static char*
|
static char*
|
||||||
get_locale_encoding(void)
|
get_locale_encoding(void)
|
||||||
{
|
{
|
||||||
#ifdef MS_WINDOWS
|
#if defined(HAVE_LANGINFO_H) && defined(CODESET)
|
||||||
char codepage[100];
|
|
||||||
PyOS_snprintf(codepage, sizeof(codepage), "cp%d", GetACP());
|
|
||||||
return get_codec_name(codepage);
|
|
||||||
#elif defined(HAVE_LANGINFO_H) && defined(CODESET)
|
|
||||||
char* codeset = nl_langinfo(CODESET);
|
char* codeset = nl_langinfo(CODESET);
|
||||||
if (!codeset || codeset[0] == '\0') {
|
if (!codeset || codeset[0] == '\0') {
|
||||||
PyErr_SetString(PyExc_ValueError, "CODESET is not set or empty");
|
PyErr_SetString(PyExc_ValueError, "CODESET is not set or empty");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue