summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-08-12 23:24:18 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-08-12 23:24:18 +0000
commit39e02b423749ca43aca0385eea6257ecde9aee92 (patch)
tree1a15ab05dce6398db23bfa3bfabcf204efce905c /toke.c
parent68de02dd13dd306ab38a3120f53d4d0e47862ec5 (diff)
downloadperl-39e02b423749ca43aca0385eea6257ecde9aee92.tar.gz
If you want you can now add -DUSE_UTF8_SCRIPTS to your cflags
and the Perl will be built to do that by default (adding that will break scripts having non-UTF-8 binary data, such as Latin-1.) p4raw-id: //depot/perl@11656
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/toke.c b/toke.c
index d535442fd9..52706a324d 100644
--- a/toke.c
+++ b/toke.c
@@ -36,11 +36,14 @@ static I32 utf16rev_textfilter(pTHXo_ int idx, SV *sv, int maxlen);
#define XFAKEBRACK 128
#define XENUMMASK 127
-#ifdef EBCDIC
-/* For now 'use utf8' does not affect tokenizer on EBCDIC */
-#define UTF (PL_linestr && DO_UTF8(PL_linestr))
+#ifdef USE_UTF8_SCRIPTS
+# define UTF (!IN_BYTES)
#else
-#define UTF ((PL_linestr && DO_UTF8(PL_linestr)) || (PL_hints & HINT_UTF8))
+# ifdef EBCDIC /* For now 'use utf8' does not affect tokenizer on EBCDIC */
+# define UTF (PL_linestr && DO_UTF8(PL_linestr))
+# else
+# define UTF ((PL_linestr && DO_UTF8(PL_linestr)) || (PL_hints & HINT_UTF8))
+# endif
#endif
/* In variables named $^X, these are the legal values for X.