diff options
Diffstat (limited to '')
-rw-r--r-- | common.h | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -28,7 +28,13 @@ #endif -#define UNICODE_MINUS "−" +#define UNICODE_MINUS "−" /* \xe2\x88\x92 */ +#define UNICODE_NBSP " " /* \xc2\xa0 */ + +#define IS_CHAR__(S, LEN, C) ((LEN) >= sizeof(C) - 1 && !memcmp((S), (C), sizeof(C) - 1)) + +#define IS_UNICODE_MINUS(S, LEN) IS_CHAR__(S, LEN, UNICODE_MINUS) +#define IS_UNICODE_NBSP(S, LEN) IS_CHAR__(S, LEN, UNICODE_NBSP) #define IS_UTF8_CHAR_CONTINUATION(B) (((B) & 0xC0) == 0x80) |