This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Compress-Raw-Zlib to CPAN version 2.048
[perl5.git] / utf8.h
diff --git a/utf8.h b/utf8.h
index dcfc68f..e558bb6 100644 (file)
--- a/utf8.h
+++ b/utf8.h
@@ -252,7 +252,9 @@ Perl's extended UTF-8 means we can have start bytes up to FF.
 #define IN_BYTES (CopHINTS_get(PL_curcop) & HINT_BYTES)
 #define DO_UTF8(sv) (SvUTF8(sv) && !IN_BYTES)
 #define IN_UNI_8_BIT \
-           (CopHINTS_get(PL_curcop) & (HINT_UNI_8_BIT|HINT_LOCALE_NOT_CHARS))
+           (CopHINTS_get(PL_curcop) & (HINT_UNI_8_BIT|HINT_LOCALE_NOT_CHARS) \
+            && ! IN_LOCALE_RUNTIME && ! IN_BYTES)
+
 
 #define UTF8_ALLOW_EMPTY               0x0001  /* Allow a zero length string */