FS#16022 - Coreutils patch coreutils-i18n.patch breaks sort -h

Attached to Project: Arch Linux
Opened by Simeon (bladud) - Saturday, 05 September 2009, 10:36 GMT
Last edited by Andrea Scarpino (BaSh) - Saturday, 05 September 2009, 13:25 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

In coreutils 7.5, the sort -h option doesn't work in a UTF-8 locale, because the coreutils-i18n patch includes a new keycompare (keycompare_mb), which doesn't call human_numcompare.

The culprit is lines 2245-2256 of the patch file, reading:

+ else if (key->numeric | key->general_numeric)
+ {
+ char savea = *lima, saveb = *limb;
+
+ *lima = *limb = '\0';
+ if (force_general_numcompare)
+ diff = general_numcompare (texta, textb);
+ else
+ diff = ((key->numeric ? numcompare : general_numcompare)
+ (texta, textb));
+ *lima = savea, *limb = saveb;
+ }

which should read like the old keycompare (now keycompare_uni):

+ else if (key->numeric | key->general_numeric | key->human_numeric)
+ {
+ char savea = *lima, saveb = *limb;
+
+ *lima = *limb = '\0';
+ diff = (key->numeric ? numcompare (texta, textb)
+ : key->general_numeric ? general_numcompare (texta, textb)
+ : human_numcompare (texta, textb, key));
+ *lima = savea, *limb = saveb;
+ }

or similar.

This task depends upon

Closed by  Andrea Scarpino (BaSh)
Saturday, 05 September 2009, 13:25 GMT
Reason for closing:  Duplicate
Additional comments about closing:  http://bugs.archlinux.org/task/15997

Loading...