diff options
Diffstat (limited to 't/op/utftaint.t')
-rw-r--r-- | t/op/utftaint.t | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/t/op/utftaint.t b/t/op/utftaint.t index cd44503e74..0edb2f2e85 100644 --- a/t/op/utftaint.t +++ b/t/op/utftaint.t @@ -31,7 +31,7 @@ use constant UTF8 => "\x{1234}"; sub is_utf8 { my $s = shift; - return 0xB6 != ord pack('a*', chr(0xB6).$s); + return 0xB6 != unpack('C', chr(0xB6).$s); } for my $ary ([ascii => 'perl'], [latin1 => "\xB6"], [utf8 => "\x{100}"]) { @@ -82,7 +82,7 @@ for my $ary ([ascii => 'perl'], [latin1 => "\xB6"], [utf8 => "\x{100}"]) { my $encode = $ary->[0]; my $utf8 = pack('U*') . $ary->[1]; - my $byte = pack('C0a*', $utf8); + my $byte = unpack('U0a*', $utf8); my $taint = $arg; substr($taint, 0) = $utf8; utf8::encode($taint); @@ -120,7 +120,7 @@ for my $ary ([ascii => 'perl'], [latin1 => "\xB6"]) { my $encode = $ary->[0]; my $up = pack('U*') . $ary->[1]; - my $down = pack('C0a*', $ary->[1]); + my $down = pack("a*", $ary->[1]); my $taint = $arg; substr($taint, 0) = $up; utf8::upgrade($taint); |