From: "maiku.fabian at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: libc-locales@sourceware.org
Subject: [Bug localedata/23774] lv_LV collates Y/y incorrectly
Date: Mon, 15 Oct 2018 12:11:00 -0000 [thread overview]
Message-ID: <bug-23774-716-23MlzKUoGa@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-23774-716@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=23774
--- Comment #1 from Mike FABIAN <maiku.fabian at gmail dot com> ---
(In reply to Danko Alexeyev from comment #0)
> Commit 159738548130d5ac4fe6178977e940ed5f8cfdc4 introduced this change in
> the lv_LV locale:
>
> -<U0079> <i>;<PCL>;<MIN>;IGNORE % y
> -<U0059> <i>;<PCL>;<CAP>;IGNORE % Y
> +<U0079> <S0069>;<LOWLINE>;<MIN>;IGNORE % y
> +<U0059> <S0069>;<LOWLINE>;<CAP>;IGNORE % Y
>
> I don't know what "PCL" meant and whether "Y" was supposed to be "BASE" in
> the first place, but "LOWLINE" certainly looks like a bug.
PCL was an old collation symbol which was used in an older version of
the glibc/localedata/locales/iso14651_t1_common file. It was a second
level collation symbol.
To get the right sort order, replacing it by any existing secondary
collation symbol except "BASE" works fine here.
The current glibc/localedata/locales/iso14651_t1_common contains:
% Second-level collating symbols
collating-symbol <BASE>
collating-symbol <LOWLINE> % COMBINING LOW LINE
collating-symbol <PSILI> % COMBINING COMMA ABOVE
collating-symbol <DASIA> % COMBINING REVERSED COMMA ABOVE
collating-symbol <AIGUT> % COMBINING ACUTE ACCENT
...
<BASE> means base letter, all the following collation symbols can be used
to indicate secondary differences to base letters. As there is nothing
particularly appropriate for the difference between i and y, it doesn’t
really matter which one is used, so I did choose the first one, LOWLINE.
> Letter Y is not present in the Latvian alphabet, however it is present in
> Latgalian and is located after I, which is what the CLDR rule seems to
> suggest:
>
> &I<<y<<<Y
This rule means that y is sorted after I *but* only as secondary difference
("<" is a primary difference, "<<" is a secondary difference, "<<<" is a
tertiary difference).
Secondary differences are "accent" differences, i.e. y is treated here
not as a really different letter from I (That would be a primary difference),
but as a "accent" variation of I. Tertiary differences are often used
for upper/lower differences, which is the case here, i.e. the difference
between y and Y is a upper/lower difference.
If you look at the sorting test file for lv_LV.UTF-8:
glibc/localedata/lv_LV.UTF-8.in
you will find that it contains:
i
I
ī
Ī
y
Y
ia
Ia
īa
Īa
ya
Ya
ib
Ib
īb
Īb
yb
Yb
If y were primary different from i, ya would be sorted *after* ib.
But as it is only a secondary difference, the primary difference between
a and b decides the order for the strings ya and ib.
> I found this by accident while investigating the result of this command on
> my system (with LANG being lv_LV.UTF-8)
>
> $ echo abcxyz | grep -Eo '[a-z]+'
> abcx
> z
>
> I'm sorry if I misunderstood something as I've never worked with either
> glibc or CLDR locales directly before.
This fails for other reasons, not because of the use of LOWLINE.
--
You are receiving this mail because:
You are on the CC list for the bug.
next prev parent reply other threads:[~2018-10-15 12:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-14 8:58 [Bug localedata/23774] New: " danko at very dot lv
2018-10-15 12:11 ` maiku.fabian at gmail dot com [this message]
2018-10-15 12:34 ` [Bug localedata/23774] " maiku.fabian at gmail dot com
2018-10-15 12:34 ` maiku.fabian at gmail dot com
2018-12-22 19:56 ` rei4dan at gmail dot com
2021-09-08 15:12 ` carlos at redhat dot com
2023-12-08 21:19 ` rudolfs.mazurs at gmail dot com
2024-02-01 22:10 ` rudolfs.mazurs at gmail dot com
2024-02-07 8:44 ` maiku.fabian at gmail dot com
2024-02-07 8:45 ` maiku.fabian at gmail dot com
2024-02-07 15:03 ` maiku.fabian at gmail dot com
2024-02-08 7:38 ` maiku.fabian at gmail dot com
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=bug-23774-716-23MlzKUoGa@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=libc-locales@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: link
Be 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).