On Aug 9 12:42, Andy Koppe wrote:
> w32api/winnls.h is lacking the macros for recognising UTF-16
> surrogates: IS_HIGH_SURROGATE, IS_LOW_SURROGATE, IS_SURROGATE_PAIR.
> Here's one way to define them, which avoids evaluating the characters
> twice:
>
> #define IS_HIGH_SURROGATE(c) (((c) & 0xFC00)
w32api/winnls.h is lacking the macros for recognising UTF-16
surrogates: IS_HIGH_SURROGATE, IS_LOW_SURROGATE, IS_SURROGATE_PAIR.
Here's one way to define them, which avoids evaluating the characters
twice:
#define IS_HIGH_SURROGATE(c) (((c) & 0xFC00) == 0xD800)
#define IS_LOW_SURROGATE(c) (((c) &
2 matches
Mail list logo