Bug 1387295

Summary: sort - human readable numeric sort doesn't work in Pashto
Product: Red Hat Enterprise Linux 6 Reporter: Jakub Prokes <jprokes>
Component: coreutilsAssignee: Kamil Dudka <kdudka>
Status: CLOSED WONTFIX QA Contact: qe-baseos-daemons
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.9CC: kdudka, rskvaril
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1420858 (view as bug list) Environment:
Last Closed: 2016-10-24 15:46:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1420858    

Description Jakub Prokes 2016-10-20 14:47:17 UTC
Description of problem:
In Pashto - locale ps_AF.utf8 doesn't work human readable sort.


Version-Release number of selected component (if applicable):
coreutils-8.4-44.el6.x86_64
glibc-common-2.12-1.192.el6.x86_64

How reproducible:
LC_ALL=ps_AF.utf8 sort -k1h data-afcomma.txt

Actual results:
1       1٫2T    1
1٫2G    1k      1٫2G
1٫2k    1G      1٫2k
1٫2M    1M      1٫2M
1٫2T    1       1٫2T
1k      1٫2G    1k
1M      1٫2M    1M
1G      1٫2k    1G
1T      1T      1T


Additional info:
:: [   LOG    ] :: Detected decimal mark '٫' for locale ps_AF.utf8
:: [   PASS   ] :: Decimal point have to be known. (Expected 0, got 0)
:: [   FAIL   ] :: LC_ALL=ps_AF.utf8 sort -k1h (Expected 0, got 1)
:: [   FAIL   ] :: LC_ALL=ps_AF.utf8 sort -k2h (Expected 0, got 1)
:: [   FAIL   ] :: LC_ALL=ps_AF.utf8 sort -k3h (Expected 0, got 1)

Comment 3 Kamil Dudka 2016-10-24 15:28:42 UTC
This is caused by the fact that ps_AF.utf8 locale uses a multi-byte character as decimal point.  This is not yet supported by upstream (neither in Fedora):

http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/sort.c?id=34d1aeaf#n1905
http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/sort.c?id=34d1aeaf#n4229
http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/sort.c?id=34d1aeaf#n4236

Unless we have a business case for this feature, it will not be fixed in RHEL.  Note that we intentionally do not have a RHEL-6 clone for bug #1355780 (similar to this one) because it introduces a change in behavior.  Implementing a fix for this bug would be even more risky.

Comment 4 RHEL Program Management 2016-10-24 15:46:17 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.