Bug 1199117

Summary: locale -a returns non-utf-8 binary strings, breaking grep and other tools
Product: [Fedora] Fedora Reporter: Martin Kolman <mkolman>
Component: glibcAssignee: Carlos O'Donell <codonell>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 21CC: arjun.is, codonell, fweimer, jakub, law, mkolman, pfrankli, spoyarek, vpodzime
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 22:09:05 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:
Embargoed:

Description Martin Kolman 2015-03-05 13:33:57 UTC
Description of problem:
With at least LANG=cs_CZ.UTF-8 and LANG=en_US.UTF-8 local -a output contains data that can't be decoded as utf-8. This breaks grep an other tools (the output for example can't be decoded by the Python utf-8 codec).


Version-Release number of selected component (if applicable):
glibc-common-2.20-7.fc21.x86_64

How reproducible:
always

Steps to Reproduce:
1. LANG=en_US.UTF-8
2. locale -a | grep bok

Actual results:
Grep returns only:
Binary file (standard input) matches

Not the actual line matching the input string.


Expected results:
Grep returns the lines matching the input string.


Additional info:
If LANG=c is set, grep returns the matching lines:

export LANG=c
locale -a | grep bok
bokmal
bokm�l

Also the offending strings that contains the non-utf-8 binary data seem to be bokm�l and fran�ais.

Comment 1 Carlos O'Donell 2015-03-05 22:09:05 UTC

*** This bug has been marked as a duplicate of bug 1184168 ***