From: lace <> Date: Wed, 25 Jan 2006 17:36:45 +0000 (+0000) Subject: Fixed charset handling of the filenames. X-Git-Tag: captive-1_1_7~11 X-Git-Url: http://git.jankratochvil.net/?p=captive.git;a=commitdiff_plain;h=0f45cca6d6d0c4a9701b82aef3cd5caa86e177dc Fixed charset handling of the filenames. - No longer redefine the 'LANG'/'LC_*' settings. - It was valid for udpgate handling only LC_MESSAGES and its windows. --- diff --git a/src/libcaptive/client/standalone.c b/src/libcaptive/client/standalone.c index b859013..d6addc7 100644 --- a/src/libcaptive/client/standalone.c +++ b/src/libcaptive/client/standalone.c @@ -43,6 +43,17 @@ void captive_standalone_init(void) * as prevented by: glib-2.6.4-noaliases.patch */ + /* Do not redefine the 'LANG'/'LC_*' settings to avoid corrupting + * filenames charset interpretation. + * Do not redefine the 'LOCPATH' settings as we just hope to find + * the right definitions - we do not supply any ourselves. + * Be sure the locale messages dirs are not ".utf8" suffixed: + * glibc-20050524T1606/locale/findlocale.c: + * If the locale name contains a charset name and the charset name used in + * the locale (present in the LC_CTYPE data) is not the same (after + * resolving aliases etc) we reject the locale + */ +#if 0 if (getenv("LC_ALL")) setenv("LC_MESSAGES",getenv("LC_ALL"), 1); /* overwrite */ @@ -60,6 +71,7 @@ void captive_standalone_init(void) /* It may differ across distributions. Maybe - just expected. */ setenv("LOCPATH",LOCALEDIR, 1); /* overwrite */ +#endif #endif /* ENABLE_STANDALONE */