URL:
  <http://savannah.gnu.org/bugs/?30895>

                 Summary: match across line using grep can be successful only
if user unset $LANG
                 Project: grep
            Submitted by: zhangweiwu
            Submitted on: Sat Aug 28 01:45:43 2010
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

reproduced on Ubuntu 10.04 LTS:

almust...@orphalese:~$ locale
LANG=zh_CN.UTF-8
LANGUAGE=zh_CN:zh
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=
almust...@orphalese:~$ printf 'a\nb\0'| grep -z 'a.*b'
almust...@orphalese:~$ export LANG=
almust...@orphalese:~$ printf 'a\nb\0'| grep -z 'a.*b'
a
b

In the above case, grep -z 'a.*b' cannot successfully match as it should, but
if user unset $LANG, it can.

expected:
  In all locales, grep should be able to match across lines using -z. This
command should always produce output:
  printf 'a\nb\0'| grep -z 'a.*b'





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?30895>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


Reply via email to