diff options
Diffstat (limited to 'utf8.h')
-rw-r--r-- | utf8.h | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -319,9 +319,9 @@ Perl's extended UTF-8 means we can have start bytes up to FF. * works on both UTF-8 encoded strings and non-encoded, as it returns TRUE in * each for the exact same set of bit patterns. (And it works on any byte in a * UTF-8 encoded string) */ -#define UTF8_IS_INVARIANT(c) UNI_IS_INVARIANT(NATIVE_TO_UTF(c)) +#define UTF8_IS_INVARIANT(c) UNI_IS_INVARIANT(NATIVE_UTF8_TO_I8(c)) -#define NATIVE_IS_INVARIANT(c) UNI_IS_INVARIANT(NATIVE8_TO_UNI(c)) +#define NATIVE_IS_INVARIANT(c) UNI_IS_INVARIANT(NATIVE_TO_LATIN1(c)) #define MAX_PORTABLE_UTF8_TWO_BYTE 0x3FF /* constrained by EBCDIC */ @@ -431,9 +431,9 @@ Perl's extended UTF-8 means we can have start bytes up to FF. * U+110001: \xF4\x90\x80\x81 \xF9\xA2\xA0\xA0\xA1 */ #ifdef EBCDIC /* Both versions assume well-formed UTF8 */ -# define UTF8_IS_SUPER(s) (NATIVE_TO_I8(* (U8*) (s)) >= 0xF9 \ - && (NATIVE_TO_I8(* (U8*) (s)) > 0xF9 \ - || (NATIVE_TO_I8(* (U8*) ((s)) + 1 >= 0xA2)))) +# define UTF8_IS_SUPER(s) (NATIVE_UTF8_TO_I8(* (U8*) (s)) >= 0xF9 \ + && (NATIVE_UTF8_TO_I8(* (U8*) (s)) > 0xF9 \ + || (NATIVE_UTF8_TO_I8(* (U8*) ((s)) + 1 >= 0xA2)))) #else # define UTF8_IS_SUPER(s) (*(U8*) (s) >= 0xF4 \ && (*(U8*) (s) > 0xF4 || (*((U8*) (s) + 1) >= 0x90))) |