Cygwin: /proc/locales: filter out useless explicit utf8 locales

Fixes: c42b98bdc6 ("Cygwin: introduce /proc/codesets and /proc/locales")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2023-03-26 14:12:13 +02:00
parent 2d5492453a
commit 80cea27942
1 changed files with 6 additions and 4 deletions

View File

@ -2240,6 +2240,7 @@ format_proc_locale_proc (LPWSTR win_locale, DWORD info, LPARAM param)
__set_charset_from_locale (posix_loc_and_modifier, codeset); __set_charset_from_locale (posix_loc_and_modifier, codeset);
*bufptr_p = add_locale (*bufptr_p, posix_loc, codeset, false, modifier, *bufptr_p = add_locale (*bufptr_p, posix_loc, codeset, false, modifier,
win_locale); win_locale);
if (strcmp (codeset, "UTF-8") != 0)
*bufptr_p = add_locale (*bufptr_p, posix_loc, "UTF-8", true, modifier, *bufptr_p = add_locale (*bufptr_p, posix_loc, "UTF-8", true, modifier,
win_locale); win_locale);
@ -2274,6 +2275,7 @@ format_proc_locale_proc (LPWSTR win_locale, DWORD info, LPARAM param)
__set_charset_from_locale (posix_loc_and_modifier, codeset); __set_charset_from_locale (posix_loc_and_modifier, codeset);
*bufptr_p = add_locale (*bufptr_p, posix_loc, codeset, false, modifier, *bufptr_p = add_locale (*bufptr_p, posix_loc, codeset, false, modifier,
win_locale); win_locale);
if (strcmp (codeset, "UTF-8") != 0 && strcmp (modifier, "@euro") != 0)
*bufptr_p = add_locale (*bufptr_p, posix_loc, "UTF-8", true, modifier, *bufptr_p = add_locale (*bufptr_p, posix_loc, "UTF-8", true, modifier,
win_locale); win_locale);