public inbox for cygwin-cvs@sourceware.org help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org> To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin/main] Cygwin: /proc/locales: fix "sr" locales Date: Fri, 24 Mar 2023 11:52:06 +0000 (GMT) [thread overview] Message-ID: <20230324115206.F0B2A3858431@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=676796498defc0f26eb1c282c716785d20788b6f commit 676796498defc0f26eb1c282c716785d20788b6f Author: Corinna Vinschen <corinna@vinschen.de> AuthorDate: Fri Mar 24 11:50:42 2023 +0100 Commit: Corinna Vinschen <corinna@vinschen.de> CommitDate: Fri Mar 24 12:50:59 2023 +0100 Cygwin: /proc/locales: fix "sr" locales The sr_XY locales are supposed to default to cyrillic, but the code always attached a @cyrillic, same reason as in the previous commit. Special case "sr" further to workaround that issue. Fixes: c42b98bdc665 ("Cygwin: introduce /proc/codesets and /proc/locales") Signed-off-by: Corinna Vinschen <corinna@vinschen.de> Diff: --- winsup/cygwin/fhandler/proc.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler/proc.cc b/winsup/cygwin/fhandler/proc.cc index 3dc0421a53b4..b74c58a11d77 100644 --- a/winsup/cygwin/fhandler/proc.cc +++ b/winsup/cygwin/fhandler/proc.cc @@ -2178,8 +2178,12 @@ format_proc_locale_proc (LPWSTR win_locale, DWORD info, LPARAM param) } /* Serbian: Windows default is Latin, Linux default is Cyrillic. We want the Linux default and attach @latin otherwise */ - else if (!wcscmp (iso639, L"sr") && !wcscmp (iso15924, L"Latn;")) - stpcpy (modifier, "@latin"); + else if (!wcscmp (iso639, L"sr")) + { + snprintf (posix_loc, sizeof posix_loc, "sr_%.27ls", iso3166); + if (!wcscmp (iso15924, L"Latn;")) + stpcpy (modifier, "@latin"); + } /* Tamazight: no modifier, iso639 is "ber" on Linux. "zgh-Tfng-MA" is equivalent to "ber_MA". */ else if (!wcscmp (iso639, L"zgh"))
reply other threads:[~2023-03-24 11:52 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230324115206.F0B2A3858431@sourceware.org \ --to=corinna@sourceware.org \ --cc=cygwin-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).