From 9aa983d27b0af31badfcbbb76567f6e557076b41 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Mon, 15 Jan 2001 05:02:24 +0000 Subject: 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 --- t/pragma/utf8.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't/pragma') diff --git a/t/pragma/utf8.t b/t/pragma/utf8.t index e3699794bb..546b217f27 100755 --- a/t/pragma/utf8.t +++ b/t/pragma/utf8.t @@ -283,7 +283,7 @@ sub nok_bytes { { use utf8; - ok_bytes chr(0xe2), pack("C*", 0xc3, 0xa2); + ok_bytes chr(0x1e2), pack("C*", 0xc7, 0xa2); $test++; # 65 } -- cgit v1.2.1