Public bug reported: Binary package hint: grep
grep is badly broken with UTF8 in intrepid. Intrepid: $ echo FOOBAR | grep FOO FOOBAR $ echo FOOBAR | grep -i FOO $ echo FOOBAR | grep -i foo $ the expected behavior is like on Hardy: $ echo FOOBAR | grep FOO FOOBAR $ echo FOOBAR | grep -i FOO FOOBAR $ echo FOOBAR | grep -i foo FOOBAR $ In both cases, my locale is set to en_US.UTF-8. Looking at the package, there's debian/patches/66-match_icase.patch showing this: >>> This fixes echo Y | LC_ALL=en_US.UTF-8 grep -i '[y]' The expected output is: Y Without this patch, it works on non UTF-8 environment, but fails on UTF-8 environment. The definition of RE_ICASE comes from the glibc (/usr/include/regex.h) Maybe lib/posix/regex.h should be removed to enforce the usage of the glibc's regex.h <<< $ echo Y | LC_ALL=en_US.UTF-8 grep -i '[y]' $ echo Y | LC_ALL=C grep -i '[y]' Y So it seems it's indeed an UTF8 issue and that the patch is no longer sufficient. ** Affects: grep (Ubuntu) Importance: Undecided Status: New -- case sensitive grep broken with UTF8 in intrepid, breaking scripts https://bugs.launchpad.net/bugs/243717 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs