After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 670403 - g_utf8_collate returns 0 on U+C5D0 vs U+CD94
g_utf8_collate returns 0 on U+C5D0 vs U+CD94
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: i18n
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks: 670232
 
 
Reported: 2012-02-19 17:24 UTC by Morten Welinder
Modified: 2018-05-24 13:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Morten Welinder 2012-02-19 17:24:54 UTC
U+C5D0 "에"
U+CD94 "추"

According to g_utf8_collate these two are identical.  They don't look
the same, so I don't think that is correct.
Comment 1 Dan Winship 2012-02-19 18:25:26 UTC
glib just defers to libc (after translating from utf8 to locale encoding if necessary). So either (a) NOTGNOME, it's a libc bug, or (b) NOTABUG, this behavior is correct. Not sure which...
Comment 2 Morten Welinder 2012-02-20 00:50:28 UTC
That's a bit too easy.

If (b) you should worry about how much glib/gtk code that is safe in the
presence of an inconsistent comparison.  qsort, for example, has undefined
behaviour and can crash.
Comment 3 Dan Winship 2012-02-20 03:31:31 UTC
It's not inconsistent (in any way qsort would care about). The two characters are equal to each other regardless of which order you compare them in.
Comment 4 Andreas J. Guelzow 2012-02-20 17:36:06 UTC
Dan, you forgot
(c) g_utf8_collate incorrectly ignores that strcoll is setting errno:
The strcoll() function may fail if:
[EINVAL] The s1 or s2 arguments contain characters outside the domain of the collating sequence.
Comment 5 Morten Welinder 2012-02-20 17:57:36 UTC
Same issue in the wcscoll branch.
Comment 6 GNOME Infrastructure Team 2018-05-24 13:47:50 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/517.