bug-grep
[Top][All Lists]
Advanced

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

[bug #30895] match across line using grep can be successful only if user


From: Zhang Weiwu
Subject: [bug #30895] match across line using grep can be successful only if user unset $LANG
Date: Sat, 28 Aug 2010 01:45:43 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.3) Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3 Mnenhy/0.8.2

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:

address@hidden:~$ 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=
address@hidden:~$ printf 'a\nb\0'| grep -z 'a.*b'
address@hidden:~$ export LANG=
address@hidden:~$ 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

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