From 2d1545e53e75b1c3ae16ad055ae011e2e015e0c3 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sun, 2 Aug 2015 21:20:44 -0600 Subject: Change meaning of UNI_IS_INVARIANT on EBCDIC platforms This should make more CPAN and other code work without change. Usually, unwittingly, code that says UNI_IS_INVARIANT means to use the native platform code values for code points below 256, so acquiesce to the expected meaning and make the macro correspond. Since the native values on ASCII machines are the same as Unicode, this change doesn't affect code running on them. A new macro, OFFUNI_IS_INVARIANT, is created for those few places that really do want a Unicode value. There are just a few places in the Perl core like that, which this commit changes. --- utfebcdic.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'utfebcdic.h') diff --git a/utfebcdic.h b/utfebcdic.h index c852946f44..5912b3a142 100644 --- a/utfebcdic.h +++ b/utfebcdic.h @@ -171,8 +171,7 @@ END_EXTERN_C (uv) < 0x400000 ? 5 : \ (uv) < 0x4000000 ? 6 : 7 ) - -#define UNI_IS_INVARIANT(c) (((UV)(c)) < 0xA0) +#define OFFUNI_IS_INVARIANT(c) (((UV)(c)) < 0xA0) /* It turns out that on EBCDIC platforms, the invariants are the characters * that have ASCII equivalents, plus the C1 controls. Since the C0 controls -- cgit v1.2.1