From 2cdfde517e53ae2c7c3393a505e1f127e714fc59 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Tue, 19 Jul 2005 22:25:43 +0000 Subject: Fixes - Fixed several errors in doxygen documentation - Initializing locale in rcclocale (if setlocale return 'C') - Calling Configure before anything else in rccRecode --- src/rcclocale.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/rcclocale.c') diff --git a/src/rcclocale.c b/src/rcclocale.c index 7bfa54b..c0b4e63 100644 --- a/src/rcclocale.c +++ b/src/rcclocale.c @@ -41,6 +41,10 @@ int rccLocaleGetLanguage(char *result, const char *lv, unsigned int n) { locale_class = rccLocaleGetClassByName(lv); if (locale_class >= 0) { l = setlocale(locale_class, NULL); + if (!strcasecmp(l,"C")) { + setlocale(LC_ALL, ""); + l = setlocale(locale_class, NULL); + } } else { if (!strcasecmp(lv, "LANG")) l = getenv("LANG"); else if (!strcasecmp(lv, "LANGUAGE")) l = getenv("LANGUAGE"); @@ -88,6 +92,10 @@ int rccLocaleGetCharset(char *result, const char *lv, unsigned int n) { if (locale_class >= 0) { l = setlocale(locale_class, NULL); + if (!strcasecmp(l,"C")) { + setlocale(LC_ALL, ""); + l = setlocale(locale_class, NULL); + } if (!l) return -1; } else return -1; -- cgit v1.2.3