From: Nguyễn Thái Ngọc Duy Date: Sat, 25 Jun 2016 05:22:30 +0000 (+0200) Subject: grep/icase: avoid kwsset on literal non-ascii strings X-Git-Tag: v2.9.3~47^2~8 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/5c1ebcca4d1df3b2a84d01b3f32ec13bf8f760f8?hp=5c1ebcca4d1df3b2a84d01b3f32ec13bf8f760f8 grep/icase: avoid kwsset on literal non-ascii strings When we detect the pattern is just a literal string, we avoid heavy regex engine and use fast substring search implemented in kwsset.c. But kws uses git-ctype which is locale-independent so it does not know how to fold case properly outside ascii range. Let regcomp or pcre take care of this case instead. Slower, but accurate. Noticed-by: Plamen Totev Helped-by: René Scharfe Helped-by: Eric Sunshine Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano ---