One more twist to the sprintf + utf8 testing.
Jarkko Hietaniemi [Thu, 16 Aug 2001 12:22:29 +0000 (12:22 +0000)]
p4raw-id: //depot/perl@11692

t/op/misc.t

index e55e18a..3cfb667 100755 (executable)
@@ -727,10 +727,13 @@ Bar=ARRAY(0x...)
 # 20010407.008 sprintf removes utf8-ness
 $a = sprintf "\x{1234}";
 printf "%x %d\n", unpack("U*", $a), length($a);
+$a = sprintf "%s", "\x{5678}";
+printf "%x %d\n", unpack("U*", $a), length($a);
 $a = sprintf "\x{1234}%s", "\x{5678}";
 printf "%x %x %d\n", unpack("U*", $a), length($a);
 EXPECT
 1234 1
+5678 1
 1234 5678 2
 ########
 # keep this last - doesn't seem to work otherwise?