GNU bug report logs - #38223
grep >=2.28 cannot handle -wF correctly under LANG=ja_JP.eucjp

Previous Next

Package: grep;

Reported by: "NIDE, Naoyuki" <nide <at> ics.nara-wu.ac.jp>

Date: Fri, 15 Nov 2019 19:54:02 UTC

Severity: normal

Tags: moreinfo

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


Message #13 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stephane Chazelas <stephane.chazelas <at> gmail.com>
To: bug-grep <at> gnu.org
Subject: Re: bug#38223: grep >=2.28 cannot handle -wF correctly under
 LANG=ja_JP.eucjp
Date: Sat, 16 Nov 2019 00:27:25 +0000
2019-11-15 13:38:38 -0800, Paul Eggert:
> On 11/15/19 11:06 AM, NIDE, Naoyuki wrote:
> > echo ba | LANG=ja_JP.eucjp grep -F -w a
> > outputs ba, but should output nothing.
> 
> I don't observe this problem with GNU grep 3.3 on Fedora 31. Please try
> upgrading to grep 3.3, the current release. If that doesn't work, please
> send more details about your configuration: what OS you're using, how you
> built 'grep', etc. Thanks.
[...]

I can reproduce on Linux Mint 19.2 Tina amd64, based on Ubuntu 18.04
with grep 3.1 and 3.3 and glibc 2.27-3ubuntu1.

$ echo ba | LC_ALL=ja_JP.eucjp ./src/grep  -o '[[:alnum:]]'
b
a
$ echo \\nba\\n | LC_ALL=ja_JP.eucjp ./src/grep  -wF a
ba

Also in these locales:

ja_JP.eucjp
ko_KR.euckr
zh_CN.gb18030
zh_CN.gb2312
zh_CN.gbk
zh_HK.big5hkscs
zh_SG.gb2312
zh_SG.gbk
zh_TW.big5
zh_TW.euctw

-- 
Stephane





This bug report was last modified 5 years and 173 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.