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




Reply via email to