diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2005-07-19 22:25:43 +0000 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2005-07-19 22:25:43 +0000 |
commit | 2cdfde517e53ae2c7c3393a505e1f127e714fc59 (patch) | |
tree | 85a0ee488bcfa68a5a773293677670c3a382bf94 /src/rcclocale.c | |
parent | 055bdab4f515b1e93155fccbe03fac43a007aa0e (diff) | |
download | librcc-2cdfde517e53ae2c7c3393a505e1f127e714fc59.tar.gz librcc-2cdfde517e53ae2c7c3393a505e1f127e714fc59.tar.bz2 librcc-2cdfde517e53ae2c7c3393a505e1f127e714fc59.tar.xz librcc-2cdfde517e53ae2c7c3393a505e1f127e714fc59.zip |
Fixes
- Fixed several errors in doxygen documentation
- Initializing locale in rcclocale (if setlocale return 'C')
- Calling Configure before anything else in rccRecode
Diffstat (limited to 'src/rcclocale.c')
-rw-r--r-- | src/rcclocale.c | 8 |
1 files changed, 8 insertions, 0 deletions
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; |