diff options
Diffstat (limited to 'src/calcurse.h')
-rw-r--r-- | src/calcurse.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/calcurse.h b/src/calcurse.h index f4f0e6c..5bf32cf 100644 --- a/src/calcurse.h +++ b/src/calcurse.h @@ -225,13 +225,10 @@ #define TOSTRING(x) STRINGIFY(x) #define __FILE_POS__ __FILE__ ":" TOSTRING(__LINE__) -#define UTF8_MAXLEN 6 -#define UTF8_LENGTH(ch) ((unsigned char)ch >= 0xFC ? 6 : \ - ((unsigned char)ch >= 0xF8 ? 5 : \ - ((unsigned char)ch >= 0xF0 ? 4 : \ +#define UTF8_MAXLEN 4 +#define UTF8_LENGTH(ch) ((unsigned char)ch >= 0xF0 ? 4 : \ ((unsigned char)ch >= 0xE0 ? 3 : \ - ((unsigned char)ch >= 0xC0 ? 2 : 1))))) -#define UTF8_ISMULTI(ch) ((unsigned char)ch >= 0x80) + ((unsigned char)ch >= 0xC0 ? 2 : 1))) #define UTF8_ISCONT(ch) ((unsigned char)ch >= 0x80 && \ (unsigned char)ch <= 0xBF) |