summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2014-10-16 19:44:07 -0600
committerKarl Williamson <khw@cpan.org>2014-10-21 09:26:50 -0600
commitd9759938eb6b6cd4b44f6be9200b1fdcce67382c (patch)
tree15bc52bc6d25a4015cdadd81a1d9891a019e0e36
parent88794300ed3b4c4d9b3ec9303c1b0c910d503082 (diff)
downloadperl-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.
-rw-r--r--utf8.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/utf8.h b/utf8.h
index d3b55ee694..3d29706e08 100644
--- a/utf8.h
+++ b/utf8.h
@@ -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. */