[Fedora-i18n-bugs] [Bug 537753] glibc: wcscoll/strcoll needs to check if the char is out of the locale collation.

bugzilla at redhat.com bugzilla at redhat.com
Wed Nov 18 00:41:14 UTC 2009


Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.


https://bugzilla.redhat.com/show_bug.cgi?id=537753


fujiwara <tfujiwar at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
               Flag|needinfo?(tfujiwar at redhat.c |
                   |om)                         |




--- Comment #4 from fujiwara <tfujiwar at redhat.com>  2009-11-17 19:41:13 EDT ---
If the char is not defined in the locale collation, wcscoll() doesn't return
the right value.

E.g. if you run the attachment 369656 on ja_JP.UTF-8, it compares Korean char
and ASCII char on ja_JP.UTF-8 but the Korean char is not defined in the ja
collation table and then wcscoll() returns the minus value but the returned
value is not correct because the Korean char value is out of the ja collation
table.
Actually I would expect the returned value is a plus value in this case if the
char value is not defined in the collation table.

As I noted comment #0, the man of wcscoll explains to set EINVAL if the char is
not defined in the locale collating sequence.

I'd like to know whether the char is defined in the collation table or not but
currently wcscoll()/strcoll() doesn't set errno.
My understanding is, __collidx_table_lookup() checks if the char is defined in
the collation table so my suggestion is to set errno if the char is not defined
in the table.

-- 
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.




More information about the i18n-bugs mailing list