Bug 219908

Summary: Wrong collate order in many non-C locales (case-insensitive)
Product: [Fedora] Fedora Reporter: Anton Guda <atu>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-12-16 09:40:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Anton Guda 2006-12-16 09:27:59 UTC
Description of problem:
When LC_COLLATE (or LANG) is set to 
en_GB, ru_RU, uk_UA...
strcoll ignores case even for latin letters.

Version-Release number of selected component (if applicable):
glibc-2.4.* ... 2.5.90-12

How reproducible:

always


Steps to Reproduce:
1. Create text file with text:
---------- cut here ------------------
A
B
C
a
b
c
---------- cut here -------------------

2. LC_COLLATE=C sort in.txt
3. LC_COLLATE=en_GB sort in.txt
  
Actual results:
Different output from runs:
C: A B C a b c (correct)
en_GB: A a B b C c (inrorrect)

The same results for some other locales (ru_RU, uk_UA, fr_FR)
both for latin and cyr hcaracters.
Similar results when using strcoll in C programs.

Expected results:
In any locales capital latin chars (A-Z) must be 'less'
than normal (a-z).
In cyrilic locales (and may be in other),
must be the same rule.

Additional info:

Comment 1 Jakub Jelinek 2006-12-16 09:40:22 UTC
Please open any dictionary for the corresponding languages and see how things
are sorted.
Case is not ignored, but in most locales it is just secondary or tertiary
differentiator.

Comment 2 Anton Guda 2006-12-18 12:02:08 UTC
It seems to be "error by design" == feature.
Ok, its not a error, but it prevents from
locale-aware case-sensitive comparison 
in most locales.