use LC_CTYPE instead of LC_ALL

git-svn-id: https://svn.musicpd.org/mpd/trunk@302 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Warren Dukes 2004-03-19 16:05:09 +00:00
parent 278985b2fd
commit 6100ca86a3
1 changed files with 2 additions and 2 deletions

View File

@ -99,14 +99,14 @@ void initPaths() {
} }
#ifdef HAVE_LOCALE #ifdef HAVE_LOCALE
#ifdef HAVE_LANGINFO #ifdef HAVE_LANGINFO
else if((originalLocale = setlocale(LC_ALL,""))) { else if((originalLocale = setlocale(LC_CTYPE,""))) {
char * temp; char * temp;
if((temp = nl_langinfo(CODESET))) { if((temp = nl_langinfo(CODESET))) {
charset = strdup(temp); charset = strdup(temp);
} }
else ERROR("problems getting charset for locale\n"); else ERROR("problems getting charset for locale\n");
if(!setlocale(LC_ALL,originalLocale)) { if(!setlocale(LC_CTYPE,originalLocale)) {
ERROR("problems resetting locale with setlocale()\n"); ERROR("problems resetting locale with setlocale()\n");
} }
} }