[Bug locale/22668] New: LC_COLLATE: the last character of ellipsis is not ordered correctly

hanataka.shinya at gmail dot com sourceware-bugzilla@sourceware.org
Thu Jan 4 02:26:00 GMT 2018


https://sourceware.org/bugzilla/show_bug.cgi?id=22668

            Bug ID: 22668
           Summary: LC_COLLATE: the last character of ellipsis is not
                    ordered correctly
           Product: glibc
           Version: 2.26
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: locale
          Assignee: unassigned at sourceware dot org
          Reporter: hanataka.shinya at gmail dot com
  Target Milestone: ---

Created attachment 10709
  --> https://sourceware.org/bugzilla/attachment.cgi?id=10709&action=edit
LC_COLLATE ellipsis bug fixing patch

LC_COLLATE: the last character of ellipsis is not ordered correctly.

If the localedata use ellipsis for LC_COLLATE and the another character is
ordered after that, the last character of ellipsis is ordered last.

For simplified example, 

LC_COLLATE
order_start forward;forward;forward;forward,position
<U0041> <U0041>;IGNORE;IGNORE;IGNORE  # A
...         ...;IGNORE;IGNORE;IGNORE
<U0044> <U0044>;IGNORE;IGNORE;IGNORE  # D
<U0045> <U0045>;IGNORE;IGNORE;IGNORE  # E
...         ...;IGNORE;IGNORE;IGNORE
<U004A> <U004A>;IGNORE;IGNORE;IGNORE  # Z

order_end

END LC_COLLATE

This rule expects A B C D E F ... Z
But glibc-2.26 results is A B C E F ... Z D.

After checking the source code of localedef, I found a problem in
handle_ellipsis () of locale/program/ld-collate.c. The insertion cursor
position is temporarily set between ellipsis in this function, but it seems
thIt does not seem to have been restored.at 

The attached patch fixes this problem, and works fine for me.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list