This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: Compress::Zlib, pack "C" and utf-8 [PATCH]
[perl5.git] / t / op / chr.t
index 056f11a..5ac453f 100644 (file)
@@ -37,7 +37,7 @@ SKIP: {
 
 sub hexes {
     no warnings 'utf8'; # avoid surrogate and beyond Unicode warnings
-    join(" ",map{sprintf"%02x",$_}unpack("C*",chr($_[0])));
+    join(" ",unpack "U0 (H2)*", chr $_[0]);
 }
 
 # The following code points are some interesting steps in UTF-8.