* cygheap.cc (cygheap_init): Default locale.charset to "UTF-8".
* dcrt0.cc (dll_crt0_1): Call setlocale (LC_CTYPE, "") here, just before resetting application locale to "C". * environ.cc (environ_init): Drop code setting locale here. * syscalls.cc (check_codepage): Break out check for required codepage from internal_setlocale. (internal_setlocale): Just convert CWD and $PATH from old charset to new charset and set internal charset. (setlocale): Change accordingly. Don't require LC_ALL or LC_CTYPE to store old locale value. Always call internal_setlocale if charset changed due to locale environment changes.
This commit is contained in:
@@ -939,7 +939,9 @@ dll_crt0_1 (void *)
|
||||
do this for noncygwin case since the signal thread is blocked due to
|
||||
LoadLibrary serialization. */
|
||||
ld_preload ();
|
||||
/* Reset current application locale to "C" per POSIX */
|
||||
/* Set internal locale to the environment settings. */
|
||||
setlocale (LC_CTYPE, "");
|
||||
/* Reset application locale to "C" per POSIX */
|
||||
_setlocale_r (_REENT, LC_CTYPE, "C");
|
||||
if (user_data->main)
|
||||
cygwin_exit (user_data->main (__argc, __argv, *user_data->envptr));
|
||||
|
Reference in New Issue
Block a user