OSDN Git Service

* cygheap.cc (cygheap_init): Default locale.charset to "UTF-8".
[pf3gnuchains/pf3gnuchains4x.git] / winsup / cygwin / dcrt0.cc
index 2a02345..e142b74 100644 (file)
@@ -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));