bug-grep
[Top][All Lists]
Advanced

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

bug#16912: [PATCH] no longer use CSET for non-UTF8 locale in DFA engine


From: Norihiro Tanaka
Subject: bug#16912: [PATCH] no longer use CSET for non-UTF8 locale in DFA engine
Date: Wed, 05 Mar 2014 22:41:31 +0900

Paolo Bonzini wrote:

> What about these two commands:
> 
>     grep [a]
>     grep -i A
> 
> Would they match \x82\x61 ("B", U+0FF22) with your patch?  And without it?

No match for all.

--
Before the patch:

$ locale -a | grep sjis
ja_JP.sjis
$ printf "\x82\x61\n" | env LC_ALL=ja_JP.sjis src/grep -i 'A'
dfaanalyze:
 0:A 1:a 2:OR 3:END 4:CAT
$ printf "\x82\x61\n" | env LC_ALL=ja_JP.sjis src/grep '[a]'
dfaanalyze:
 0:MBCSET 1:END 2:CAT

After the patch:

$ locale -a | grep sjis
ja_JP.sjis
$ printf "\x82\x61\n" | env LC_ALL=ja_JP.sjis src/grep -i 'A'
dfaanalyze:
 0:CSET 1:END 2:CAT
$ printf "\x82\x61\n" | env LC_ALL=ja_JP.sjis src/grep '[a]'
dfaanalyze:
 0:CSET 1:END 2:CAT
--

Norihiro






reply via email to

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