Commit 13fe106
committed
bugfix: char class casefold for certain chars
When a character is less than or equal to single byte size (0xff),
yet it takes more than 1 byte in the current encoding, the
case folding code incorrectly put it in bitset instead of code
range. As a result, for utf8 encoding, casefold works incorrectly
on characters in range \u0080 to \u00ff (latin1 supplement).
Before fix:
* `"\u00c2"` `[\u00e0-\u00e5]` returns false
* `"\u00c2"` `[\u00e2]` returns false
* `"\u00c2"` `\u00e2` returns true1 parent 005b574 commit 13fe106
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
0 commit comments