Cygwin: locale: fix devanagari modifier

Effectively revert commit 57bac33359.  The fact that the
devanagari modifier was called devanagar (missing the trailing 'i')
is a result of `locale -av' shortening the locale name to a maximum
of 15 characters.

D'oh.  I guess we need a better way to do this...

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2023-02-26 17:17:33 +01:00
parent c42b98bdc6
commit abd81bc01f
4 changed files with 6 additions and 6 deletions

View File

@ -2214,7 +2214,7 @@ format_proc_locale_proc (LPWSTR win_locale, DWORD info, LPARAM param)
else if (!wcscmp (iso15924, L"Cyrl;")) else if (!wcscmp (iso15924, L"Cyrl;"))
stpcpy (modifier, "@cyrillic"); stpcpy (modifier, "@cyrillic");
else if (!wcscmp (iso15924, L"Deva;")) else if (!wcscmp (iso15924, L"Deva;"))
stpcpy (modifier, "@devanagar"); stpcpy (modifier, "@devanagari");
else if (!wcscmp (iso15924, L"Adlm;")) else if (!wcscmp (iso15924, L"Adlm;"))
stpcpy (modifier, "@adlam"); stpcpy (modifier, "@adlam");
else else

View File

@ -14,7 +14,7 @@
awk '/^locale:/{ awk '/^locale:/{
if ( index ($2, "_") == 0 ) next # No aliases if ( index ($2, "_") == 0 ) next # No aliases
if ( index ($2, ".") > 0 ) next # No explicit codesets if ( index ($2, ".") > 0 ) next # No explicit codesets
locale=$2; locale = gensub (/devanagar.*/, "devanagari", 1, $2);
} }
/codeset/ { /codeset/ {
if ( length (locale) == 0 ) next if ( length (locale) == 0 ) next

View File

@ -1,5 +1,5 @@
/* This struct of default codesets has been generated by fetching /* This struct of default codesets has been generated by fetching
locale data from a Linux system using glibc-2.36-9.fc37.x86_64 on 2023-02-25 */ locale data from a Linux system using glibc-2.36-9.fc37.x86_64 on 2023-02-26 */
struct default_codeset_t struct default_codeset_t
{ {
const char *locale; const char *locale;
@ -193,7 +193,7 @@ struct default_codeset_t
{ "ko_KR", "EUC-KR" }, { "ko_KR", "EUC-KR" },
{ "kok_IN", "UTF-8" }, { "kok_IN", "UTF-8" },
{ "ks_IN", "UTF-8" }, { "ks_IN", "UTF-8" },
{ "ks_IN@devanagar", "UTF-8" }, { "ks_IN@devanagari", "UTF-8" },
{ "ku_TR", "ISO-8859-9" }, { "ku_TR", "ISO-8859-9" },
{ "kw_GB", "ISO-8859-1" }, { "kw_GB", "ISO-8859-1" },
{ "ky_KG", "UTF-8" }, { "ky_KG", "UTF-8" },
@ -269,7 +269,7 @@ struct default_codeset_t
{ "sat_IN", "UTF-8" }, { "sat_IN", "UTF-8" },
{ "sc_IT", "UTF-8" }, { "sc_IT", "UTF-8" },
{ "sd_IN", "UTF-8" }, { "sd_IN", "UTF-8" },
{ "sd_IN@devanagar", "UTF-8" }, { "sd_IN@devanagari", "UTF-8" },
{ "se_NO", "UTF-8" }, { "se_NO", "UTF-8" },
{ "sgs_LT", "UTF-8" }, { "sgs_LT", "UTF-8" },
{ "shn_MM", "UTF-8" }, { "shn_MM", "UTF-8" },

View File

@ -126,7 +126,7 @@ __get_rfc5646_from_locale (const char *name, wchar_t *win_locale)
idx = 0; idx = 0;
else if (!strcmp (modifier, "cyrillic")) else if (!strcmp (modifier, "cyrillic"))
idx = 1; idx = 1;
else if (!strcmp (modifier, "devanagar")) else if (!strcmp (modifier, "devanagari"))
idx = 2; idx = 2;
else if (!strcmp (modifier, "adlam")) else if (!strcmp (modifier, "adlam"))
idx = 3; idx = 3;