mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-21 00:07:36 +08:00
* syscalls.cc (internal_setlocale): Use UTF-8 internally if external
charset is ASCII.
This commit is contained in:
parent
32cb8c8cfe
commit
62910474ac
@ -1,3 +1,8 @@
|
||||
2010-01-17 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* syscalls.cc (internal_setlocale): Use UTF-8 internally if external
|
||||
charset is ASCII.
|
||||
|
||||
2010-01-15 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* libc/fnmatch.c: Replace with multibyte capable version from FreeBSD.
|
||||
|
@ -4348,8 +4348,16 @@ internal_setlocale ()
|
||||
cwdstuff::cwd_lock.acquire ();
|
||||
sys_mbstowcs (w_cwd, 32768, cygheap->cwd.get_posix ());
|
||||
/* Set charset for internal conversion functions. */
|
||||
cygheap->locale.mbtowc = __mbtowc;
|
||||
cygheap->locale.wctomb = __wctomb;
|
||||
if (*__locale_charset () == 'A'/*SCII*/)
|
||||
{
|
||||
cygheap->locale.mbtowc = __utf8_mbtowc;
|
||||
cygheap->locale.wctomb = __utf8_wctomb;
|
||||
}
|
||||
else
|
||||
{
|
||||
cygheap->locale.mbtowc = __mbtowc;
|
||||
cygheap->locale.wctomb = __wctomb;
|
||||
}
|
||||
strcpy (cygheap->locale.charset, __locale_charset ());
|
||||
/* Restore CWD and PATH in new charset. */
|
||||
cygheap->cwd.reset_posix (w_cwd);
|
||||
|
Loading…
x
Reference in New Issue
Block a user