regcomp: limit comparison to C locale only
authorJohn Marino <draco@marino.st>
Fri, 31 Jul 2015 13:00:23 +0000 (15:00 +0200)
committerJohn Marino <draco@marino.st>
Fri, 31 Jul 2015 13:06:16 +0000 (15:06 +0200)
commitcf459965c14d539c708315b65b83926f4d5fa2fb
tree183b98829a8bb34a04c191b8242a90ee6d1af0ac
parent413d9c151bfb1a7954df4efe6df5b132fedb1a1f
regcomp: limit comparison to C locale only

The regex code does not work with multibyte codesets like UTF-8.  In fact,
it doesn't even work with single-byte codesets like ISO-8859-1.  The
comparison blows up at index 128 (the range is 0 to UCHAR_MAX (255).

As a temporary workaround, all comparisons will be done in C locale
regardless of the environment setting.  The regex library needs to be
updated to handle all codesets.
lib/libc/regex/regcomp.c