This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make AIX and Tru64 compilers happy.
[perl5.git] / utf8.h
diff --git a/utf8.h b/utf8.h
index e23cff2..01c6199 100644 (file)
--- a/utf8.h
+++ b/utf8.h
@@ -7,6 +7,15 @@
  *
  */
 
+/* Use UTF-8 as the default script encoding?
+ * Turning this on will break scripts having non-UTF8 binary
+ * data (such as Latin-1) in string literals. */
+#ifdef USE_UTF8_SCRIPTS
+#    define USE_UTF8_IN_NAMES (!IN_BYTES)
+#else
+#    define USE_UTF8_IN_NAMES (PL_hints & HINT_UTF8)
+#endif
+
 #ifdef EBCDIC
 /* The equivalent of these macros but implementing UTF-EBCDIC
    are in the following header file:
@@ -128,7 +137,6 @@ END_EXTERN_C
 
 #define UTF8_MAXLEN 13 /* how wide can a single UTF8 encoded character become */
 
-/* #define IN_UTF8 (PL_curcop->op_private & HINT_UTF8) */
 #define IN_BYTES (PL_curcop->op_private & HINT_BYTES)
 #define DO_UTF8(sv) (SvUTF8(sv) && !IN_BYTES)
 
@@ -145,7 +153,7 @@ END_EXTERN_C
                                         UTF8_ALLOW_SURROGATE|UTF8_ALLOW_BOM|\
                                         UTF8_ALLOW_FFFF|UTF8_ALLOW_LONG)
 #define UTF8_ALLOW_ANY                 0x00ff
-#define UTF8_CHECK_ONLY                        0x0100
+#define UTF8_CHECK_ONLY                        0x0200
 
 #define UNICODE_SURROGATE_FIRST                0xd800
 #define UNICODE_SURROGATE_LAST         0xdfff