Package: grep
Version: 2.5.1.ds2-4
Severity: minor

Seems bad:
$ echo $'\x80'|LC_ALL=C grep [$'\x80']|wc -c
2
$ echo $'\x80'|grep [$'\x80']|wc -c
0
$ locale
LANG=zh_TW.utf8
LC_CTYPE=zh_TW.utf8
LC_NUMERIC="zh_TW.utf8"
LC_TIME="zh_TW.utf8"
LC_COLLATE=C
LC_MONETARY="zh_TW.utf8"
LC_MESSAGES=C
LC_PAPER="zh_TW.utf8"
LC_NAME="zh_TW.utf8"
LC_ADDRESS="zh_TW.utf8"
LC_TELEPHONE="zh_TW.utf8"
LC_MEASUREMENT="zh_TW.utf8"
LC_IDENTIFICATION="zh_TW.utf8"
LC_ALL=

Upstream says
J> I don't think this is a bug in GNU Grep itself, but maybe is a bug
J> introduced by one of the patches that Debian apply to their package of
J> Grep.  You might want to report it to Debian.

J> It has just occurred to me that, because the byte 0x80 is not a valid
J> UTF-8
J> string (as far as I know), when Grep is asked to search for a pattern
J> consisting of only that byte, in a UTF-8 locale, the behaviour could
J> be expected to be undefined.  Therefore other people might not regard
J> this as a bug.

J> - Julian

OK, not sure if a bug or which exact package. Without the [] of course
all is well. Maybe no bug at all.



Reply via email to