FS#15293 - grep -i does not work fine with LC_CTYPE=sk_SK.utf-8

Attached to Project: Arch Linux
Opened by jozef riha (jose1711) - Sunday, 28 June 2009, 10:18 GMT
Last edited by Roman Kyrylych (Romashka) - Sunday, 28 June 2009, 15:13 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Allan McRae (Allan)
Architecture i686
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
grep does not work in this example:
export LC_CTYPE="sk_SK.utf-8"
echo $'\305\240portov\303\241' | grep -i $'\305\240portov\303\241'
--> produces empty output

Expected result:
Športová

Additional info:
* GNU grep 2.5.4
* LANG=sk_SK.utf8
LC_CTYPE=sk_SK.utf-8
LC_NUMERIC="sk_SK.utf8"
LC_TIME="sk_SK.utf8"
LC_COLLATE=C
LC_MONETARY="sk_SK.utf8"
LC_MESSAGES="sk_SK.utf8"
LC_PAPER="sk_SK.utf8"
LC_NAME="sk_SK.utf8"
LC_ADDRESS="sk_SK.utf8"
LC_TELEPHONE="sk_SK.utf8"
LC_MEASUREMENT="sk_SK.utf8"
LC_IDENTIFICATION="sk_SK.utf8"
LC_ALL=

Steps to reproduce:
1. uncomment sk_SK.UTF-8 UTF-8 in /etc/locale.gen and run locale-gen
2. run: export LC_CTYPE="sk_SK.utf-8"; echo $'\305\240portov\303\241' | grep -i $'\305\240portov\303\241'
3. compare with: export LC_CTYPE=C; echo $'\305\240portov\303\241' | grep -i $'\305\240portov\303\241'

Other:
- please note that grep works when you ommit -i flag
- there's also a problem with recode (extra)

echo $'\304\214ajakova' | recode -f utf-8..flat
--> nothing
on a Debian system this produces: Cajakova
This task depends upon

Closed by  Roman Kyrylych (Romashka)
Sunday, 28 June 2009, 15:13 GMT
Reason for closing:  Fixed
Comment by Jan de Groot (JGC) - Sunday, 28 June 2009, 11:42 GMT
What happens when you set LC_COLLATE to sk_SK.utf8 also?
Comment by jozef riha (jose1711) - Sunday, 28 June 2009, 11:59 GMT
[jose@darkstar ~]$ export LC_COLLATE="sk_SK.utf8"; echo $'\305\240portov\303\241' | grep -i $'\305\240portov\303\241'
[jose@darkstar ~]$

same..
Comment by Allan McRae (Allan) - Sunday, 28 June 2009, 13:43 GMT
This should be fixed with grep in [testing]. See  FS#14877 .
Comment by Allan McRae (Allan) - Sunday, 28 June 2009, 13:53 GMT
And I can confirm it is indeed fixed in grep-2.5.4-2

Loading...