2 echo Y | LC_ALL=en_US.UTF-8 grep -i '[y]'
3 The expected output is:
6 Without this patch, it works on non UTF-8 environment, but fails on UTF-8
9 The definition of RE_ICASE comes from the glibc (/usr/include/regex.h)
11 Maybe lib/posix/regex.h should be removed to enforce the usage of the
14 --- lib/posix/regex.h.orig 2004-01-05 12:09:12.984391131 +0000
15 +++ lib/posix/regex.h 2004-01-05 12:09:24.717990622 +0000
18 #define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
20 +/* If this bit is set, then ignore case when matching.
21 + If not set, then case is significant. */
22 +#define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1)
24 /* This global variable defines the particular regexp syntax to use (for
25 some interfaces). When a regexp is compiled, the syntax used is
26 stored in the pattern buffer, so changing this does not affect
27 --- src/search.c.orig 2005-09-06 23:50:40.000000000 +0200
28 +++ src/search.c 2005-09-06 23:59:33.000000000 +0200
30 char const *motif = pattern;
35 syntax_bits |= RE_ICASE;
37 re_set_syntax (syntax_bits);
38 dfasyntax (syntax_bits, match_icase, eolbyte);