[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug#468912: grep: -z is broken under UTF-8 locales

From: Aníbal Monsalve Salazar
Subject: Re: Bug#468912: grep: -z is broken under UTF-8 locales
Date: Sun, 29 Mar 2009 17:12:37 +1100
User-agent: Mutt/1.5.18 (2008-05-17)

forwarded 468912 address@hidden

On Sun, Jan 11, 2009 at 10:43:51AM -0500, Ruben Molina wrote:
>On Sun, Mar 02, 2008 at 11:46:41AM +0100, Jakub Wilk wrote:
>>Package: grep
>>Version: 2.5.3~dfsg-3
>>Severity: normal
>>$ export LC_ALL=POSIX
>>$ locale
>>$ printf 'x\0y\0x\0' | grep -z '^x'; echo
>>$ export LC_ALL=en_US.utf8
>>$ locale
>>$ printf 'x\0y\0x\0' | grep -z '^x'; echo
>>-- System Information:
>>Debian Release: lenny/sid
>>   APT prefers testing
>>   APT policy: (900, 'testing'), (600, 'unstable'), (500, 'experimental')
>>Architecture: i386 (i686)
>>Kernel: Linux 2.6.24-1-686 (SMP w/2 CPU cores)
>>Locale: LANG=C, LC_CTYPE=pl_PL.utf8 (charmap=UTF-8)
>>Shell: /bin/sh linked to /bin/dash
>>Versions of packages grep depends on:
>>ii  libc6                         2.7-6      GNU C Library: Shared libraries
>>grep recommends no packages.
>>-- no debconf information
>>Jakub Wilk
>tags  468912  + confirmed
>found 468912 2.5.3~dfsg-6
>$ locale
>$ printf 'x\0y\0x\0' | grep -z '^x'; echo

I can reproduce this bug with 2.5.4

grep -V
GNU grep 2.5.4

printf 'x\0y\0x\0' | grep -z '^x'; echo; echo $?

LANG=en_AU.UTF-8 printf 'x\0y\0x\0' | LANG=en_AU.UTF-8 grep -z '^x'; echo; echo 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]