summaryrefslogtreecommitdiff
path: root/utf8.h
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgs@consttype.org>2009-12-20 16:23:36 +0100
committerRafael Garcia-Suarez <rgs@consttype.org>2009-12-20 16:28:36 +0100
commit1863b87966ed39b042c45e12d1b4e0b90b9cc071 (patch)
treeeae5c03c697269b036352d4b007f9c1294f189c9 /utf8.h
parent1d5fe431325abdb0f3947d563ebdef67bd4cb7cd (diff)
downloadperl-1863b87966ed39b042c45e12d1b4e0b90b9cc071.tar.gz
Introduce C<use feature "unicode_strings">
This turns on the unicode semantics for uc/lc/ucfirst/lcfirst operations on strings without the UTF8 bit set but with ASCII characters higher than 127. This replaces the "legacy" pragma experiment. Note that currently this feature sets both a bit in $^H and a (unused) key in %^H. The bit in $^H could be replaced by a flag on the uc/lc/etc op. It's probably not feasible to test a key in %^H in pp_uc in friends each time we want to know which semantics to apply.
Diffstat (limited to 'utf8.h')
-rw-r--r--utf8.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/utf8.h b/utf8.h
index 8fef274ff1..9eed545305 100644
--- a/utf8.h
+++ b/utf8.h
@@ -206,7 +206,7 @@ encoded character.
#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_NOT_UNI_8_BIT)) \
+#define IN_UNI_8_BIT ( (CopHINTS_get(PL_curcop) & HINT_UNI_8_BIT) \
&& ! IN_LOCALE_RUNTIME && ! IN_BYTES)
#define UTF8_ALLOW_EMPTY 0x0001