Bug 1199117 - locale -a returns non-utf-8 binary strings, breaking grep and other tools
Summary: locale -a returns non-utf-8 binary strings, breaking grep and other tools
Keywords:
Status: CLOSED DUPLICATE of bug 1184168
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 21
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Carlos O'Donell
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-05 13:33 UTC by Martin Kolman
Modified: 2016-11-24 12:19 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 22:09:05 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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 ***


Note You need to log in before you can comment on or make changes to this bug.