* nlsfuncs.cc (__set_charset_from_locale): Allow "@euro" modifier only
for locales which use EUR as currency.
This commit is contained in:
parent
ae40237a0a
commit
4f1c922e06
|
@ -1,3 +1,8 @@
|
||||||
|
2010-02-10 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* nlsfuncs.cc (__set_charset_from_locale): Allow "@euro" modifier only
|
||||||
|
for locales which use EUR as currency.
|
||||||
|
|
||||||
2010-02-10 Corinna Vinschen <corinna@vinschen.de>
|
2010-02-10 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* nlsfuncs.cc (__get_lcid_from_locale): Convert iu_CA to iu-Latn-CA
|
* nlsfuncs.cc (__get_lcid_from_locale): Convert iu_CA to iu-Latn-CA
|
||||||
|
|
|
@ -879,6 +879,7 @@ __set_charset_from_locale (const char *locale, char *charset)
|
||||||
{
|
{
|
||||||
UINT cp;
|
UINT cp;
|
||||||
LCID lcid = __get_lcid_from_locale (locale);
|
LCID lcid = __get_lcid_from_locale (locale);
|
||||||
|
wchar_t wbuf[9];
|
||||||
|
|
||||||
/* "C" locale, or invalid locale? */
|
/* "C" locale, or invalid locale? */
|
||||||
if (lcid == 0 || lcid == (LCID) -1)
|
if (lcid == 0 || lcid == (LCID) -1)
|
||||||
|
@ -967,7 +968,9 @@ __set_charset_from_locale (const char *locale, char *charset)
|
||||||
else if (lcid == 0x042e) /* hsb_DE (Upper Sorbian/Germany) */
|
else if (lcid == 0x042e) /* hsb_DE (Upper Sorbian/Germany) */
|
||||||
cs = "ISO-8859-2";
|
cs = "ISO-8859-2";
|
||||||
else if (lcid == 0x0491 /* gd_GB (Scots Gaelic/Great Britain) */
|
else if (lcid == 0x0491 /* gd_GB (Scots Gaelic/Great Britain) */
|
||||||
|| has_modifier ("@euro"))
|
|| (has_modifier ("@euro")
|
||||||
|
&& GetLocaleInfoW (lcid, LOCALE_SINTLSYMBOL, wbuf, 9)
|
||||||
|
&& !wcsncmp (wbuf, L"EUR", 3)))
|
||||||
cs = "ISO-8859-15";
|
cs = "ISO-8859-15";
|
||||||
else
|
else
|
||||||
cs = "ISO-8859-1";
|
cs = "ISO-8859-1";
|
||||||
|
|
Loading…
Reference in New Issue