diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index b56af5aee..fdcf07800 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,8 @@ +2011-11-28 Corinna Vinschen + + * locale.cc (print_locale_with_codeset): Fetch Windows path as UNICODE + path and convert that to POSIX. + 2011-11-28 Corinna Vinschen * ps.cc: Remove all Win 9x considerations. Use psapi functions diff --git a/winsup/utils/locale.cc b/winsup/utils/locale.cc index 8ce7a5253..572ed4bcf 100644 --- a/winsup/utils/locale.cc +++ b/winsup/utils/locale.cc @@ -154,10 +154,10 @@ print_locale_with_codeset (int verbose, loc_t *locale, bool utf8, return; if (!sysroot) { - char sysbuf[PATH_MAX]; + WCHAR sysbuf[PATH_MAX]; HMODULE k32 = GetModuleHandleW (L"kernel32.dll"); - if (GetModuleFileName (k32, sysbuf, PATH_MAX)) - sysroot = (const char *) cygwin_create_path (CCP_WIN_A_TO_POSIX, + if (GetModuleFileNameW (k32, sysbuf, PATH_MAX)) + sysroot = (const char *) cygwin_create_path (CCP_WIN_W_TO_POSIX, sysbuf); if (!sysroot) sysroot = "kernel32.dll";