diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-01-15 05:02:24 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-01-15 05:02:24 +0000 |
commit | 79f7f9d2a4fc01b437fadf7c3da0e6408b687a0e (patch) | |
tree | a3290ebe9e4a9773e967a8beb2895428f7e717c7 /t/op/length.t | |
parent | 2925b8575ac001da80ed3e3e684ae7dd06386ad0 (diff) | |
download | perl-79f7f9d2a4fc01b437fadf7c3da0e6408b687a0e.tar.gz |
More UTF-8 patches from Inaba Hiroto.
- The substr lval was still not okay.
- Now pp_stringify and sv_setsv copies source's UTF8 flag
even if IN_BYTE. pp_stringify is called from fold_constants
at optimization phase and "\x{100}" was made SvUTF8_off under
use bytes (the bytes pragma is for "byte semantics" and not
for "do not produce UTF8 data")
- New `qu' operator to generate UTF8 string explicitly.
Though I agree with the policy "0x00-0xff always produce bytes",
sometimes want to such a string to be coded in UTF8.
I can use pack"U0a*" but it requires more typing and has
runtime overhead.
- Fix pp_regcomp bug uncovered by "0x00-0xff always produce bytes"
change, the bug appears if a pm has PMdf_UTF8 flag but interpolated
string is not UTF8_on and has char 0x80-0xff.
TODO: document and test qu.
p4raw-id: //depot/perl@8439
Diffstat (limited to 't/op/length.t')
-rw-r--r-- | t/op/length.t | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/t/op/length.t b/t/op/length.t index aec6a52871..46f0c59698 100644 --- a/t/op/length.t +++ b/t/op/length.t @@ -33,8 +33,7 @@ print "ok 3\n"; } { - use utf8; # make "\x{80}" to produce UTF-8 - my $a = "\x{80}"; + my $a = qu"\x{80}"; # make "\x{80}" to produce UTF-8 print "not " unless length($a) == 1; print "ok 6\n"; |