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 317930 - Bad folder sorting when a zero is involved
Bad folder sorting when a zero is involved
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
2.8.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2005-10-04 14:03 UTC by Sebastien Bacher
Modified: 2011-02-18 16:13 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12



Description Sebastien Bacher 2005-10-04 14:03:26 UTC
This bug has been opened here: https://bugzilla.ubuntu.com/show_bug.cgi?id=16283

"Hi everyone

e.g. folders A0, A1, A2 will be sorted this way in Nautilus:

A1, A2, A0

It's not a major issue, but a bit annoying if we look for A0 and forgot this bug!!

Thx for your WONDERFUL job already done"
Comment 1 Sebastien Bacher 2005-10-04 14:05:15 UTC
That happens if you create "0-file", "1-file" by example, the 1 is sorted first
by nautilus 2.12 or the GTK fileselector
Comment 2 Matthias Clasen 2005-10-05 17:15:31 UTC
I don't see this.
Comment 3 Matthias Clasen 2005-10-05 17:39:14 UTC
I've added collation unit tests to GLib which show that
g_utf8_collate_key_for_filename() sorts A0, A1, A2 as expected.
Comment 4 Sebastien Bacher 2005-10-05 17:44:49 UTC
I use a  fr_FR.UTF-8 locale
Comment 5 Sebastien Bacher 2005-10-05 17:55:44 UTC
with a fr_FR.UTF-8 locale

$ sh run-collate-tests.sh -v
Sorting ./collate/collate-1.in
Sorting ./collate/collate-2.in
All tests passed.

$ cat files
afile
0-file
that
1-file
080

$ ./unicode-collate files
080
0-file
1-file
afile
that

$ ./unicode-collate --file files
1-file
0-file
080
afile
that
Comment 6 Matthias Clasen 2005-10-05 19:00:50 UTC
I can reproduce that. 
Comment 7 Matthias Clasen 2005-10-07 03:06:16 UTC
2005-10-06  Matthias Clasen  <mclasen@redhat.com>

        * glib/gunicollate.c (g_utf8_collate_key_for_filename): Handle
        all-zero sequences correctly.  (#317930, Sebastien Bacher)