mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-03-01 20:45:37 +08:00
* libc/locale/locale.c (loadlocale): Allow three character
language codes to accommodate ISO 639-2 codes.
This commit is contained in:
parent
62910474ac
commit
d24015235c
@ -1,3 +1,8 @@
|
|||||||
|
2010-01-17 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* libc/locale/locale.c (loadlocale): Allow three character
|
||||||
|
language codes to accommodate ISO 639-2 codes.
|
||||||
|
|
||||||
2010-01-17 Corinna Vinschen <corinna@vinschen.de>
|
2010-01-17 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* libc/locale/locale.c (lc_ctype_charset): Disable defaulting to
|
* libc/locale/locale.c (lc_ctype_charset): Disable defaulting to
|
||||||
|
@ -51,8 +51,10 @@ the form
|
|||||||
|
|
||||||
language[_TERRITORY][.charset][@@modifier]
|
language[_TERRITORY][.charset][@@modifier]
|
||||||
|
|
||||||
<<"language">> is a two character string per ISO 639. <<"TERRITORY">> is a
|
<<"language">> is a two character string per ISO 639, or, if not available
|
||||||
country code per ISO 3166. For <<"charset">> and <<"modifier">> see below.
|
for a given language, a three character string per ISO 639-2.
|
||||||
|
<<"TERRITORY">> is a country code per ISO 3166. For <<"charset">> and
|
||||||
|
<<"modifier">> see below.
|
||||||
|
|
||||||
Additionally to the POSIX specifier, seven extensions are supported for
|
Additionally to the POSIX specifier, seven extensions are supported for
|
||||||
backward compatibility with older implementations using newlib:
|
backward compatibility with older implementations using newlib:
|
||||||
@ -473,6 +475,9 @@ loadlocale(struct _reent *p, int category)
|
|||||||
|| c[1] < 'a' || c[1] > 'z')
|
|| c[1] < 'a' || c[1] > 'z')
|
||||||
return NULL;
|
return NULL;
|
||||||
c += 2;
|
c += 2;
|
||||||
|
/* Allow three character Language per ISO 639-2 */
|
||||||
|
if (c[0] >= 'a' && c[0] <= 'z')
|
||||||
|
++c;
|
||||||
if (c[0] == '_')
|
if (c[0] == '_')
|
||||||
{
|
{
|
||||||
/* Territory */
|
/* Territory */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user