diff options
author | Karl Williamson <khw@cpan.org> | 2014-10-16 19:44:07 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2014-10-21 09:26:50 -0600 |
commit | d9759938eb6b6cd4b44f6be9200b1fdcce67382c (patch) | |
tree | 15bc52bc6d25a4015cdadd81a1d9891a019e0e36 /utf8.h | |
parent | 88794300ed3b4c4d9b3ec9303c1b0c910d503082 (diff) | |
download | perl-d9759938eb6b6cd4b44f6be9200b1fdcce67382c.tar.gz |
utf8.h: EBCDIC fix
These macros are supposed to accommodate larger than a byte inputs.
Therefore, under EBCDIC, we have to use a different macro which handles
the larger values. On ASCII platforms, these called macros are no-ops
so it doesn't matter there.
Diffstat (limited to 'utf8.h')
-rw-r--r-- | utf8.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -382,11 +382,11 @@ Perl's extended UTF-8 means we can have start bytes up to FF. #define UTF8_TWO_BYTE_HI(c) \ (__ASSERT_((sizeof(c) == 1) \ || !(((WIDEST_UTYPE)(c)) & ~MAX_PORTABLE_UTF8_TWO_BYTE)) \ - ((U8) __BASE_TWO_BYTE_HI(c, NATIVE_TO_LATIN1))) + ((U8) __BASE_TWO_BYTE_HI(c, NATIVE_TO_UNI))) #define UTF8_TWO_BYTE_LO(c) \ (__ASSERT_((sizeof(c) == 1) \ || !(((WIDEST_UTYPE)(c)) & ~MAX_PORTABLE_UTF8_TWO_BYTE)) \ - ((U8) __BASE_TWO_BYTE_LO(c, NATIVE_TO_LATIN1))) + ((U8) __BASE_TWO_BYTE_LO(c, NATIVE_TO_UNI))) /* This is illegal in any well-formed UTF-8 in both EBCDIC and ASCII * as it is only in overlongs. */ |