diff options
| author | Tyge Løvset <[email protected]> | 2022-02-23 09:35:52 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-02-23 09:35:52 +0100 |
| commit | 9a06a1caececf1ea3136c3ec80e0ecadb6b29f53 (patch) | |
| tree | 4cf37d8a433c03796c5fe40845e247b04f4c44ab /src | |
| parent | 2e99df7992876c7270192342d3def4a4f7c82319 (diff) | |
| download | STC-modified-9a06a1caececf1ea3136c3ec80e0ecadb6b29f53.tar.gz STC-modified-9a06a1caececf1ea3136c3ec80e0ecadb6b29f53.zip | |
utf8_isspace missed a few codepoints
Diffstat (limited to 'src')
| -rw-r--r-- | src/casefold.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/casefold.py b/src/casefold.py index 17b0b99e..de08837e 100644 --- a/src/casefold.py +++ b/src/casefold.py @@ -181,8 +181,8 @@ bool utf8_islower(uint32_t c) { } bool utf8_isspace(uint32_t c) { - static uint16_t t[] = {0x09, 0x0D, 0x20, 0x85, 0xA0, 0x1680, - 0x2028, 0x2029, 0x202F, 0x205F, 0x3000}; + static uint16_t t[] = {0x20, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x85, 0xA0, + 0x1680, 0x2028, 0x2029, 0x202F, 0x205F, 0x3000}; for (int i=0; i<sizeof t/sizeof *t; ++i) if (c == t[i]) return true; return (c >= 0x2000) & (c <= 0x200A); @@ -195,8 +195,8 @@ bool utf8_isdigit(uint32_t c) { } bool utf8_isxdigit(uint32_t c) { - static uint16_t t[] = {0x30, 0x39, 0x41, 0x46, 0x61, 0x66, - 0xFF10, 0xFF19, 0xFF21, 0xFF26, 0xFF41, 0xFF46}; + static uint16_t t[] = {0x30, 0x39, 0x41, 0x46, 0x61, 0x66, 0xFF10, + 0xFF19, 0xFF21, 0xFF26, 0xFF41, 0xFF46}; for (int i=1; i<sizeof t/sizeof *t; i += 2) if (c <= t[i]) return c >= t[i - 1]; return false; |
