On Sat, 2006-08-26 at 16:43, Dave Rolsky wrote:

> > t/21-escapes..................NOK 3#     Failed test (t/21-escapes.t at

> This is weird. My first guess would be that something is broken with "use 
> bytes" in 5.8.0. There've been a lot of utf8 bug fixes since 5.8.0
> 
> What does this print for you?

Hi Dave; it prints what you suggested it should:

==========================================================
perl -le '$x = "=\x{2022}"; use bytes; print ord for split //, $x'
61
226
128
162
==========================================================

I tried a few similar tests. Using a regex seems to screw things up, but
once the characters have been passed to split, a regex does the right
thing:
==========================================================
use bytes;
my $url3 = qq|"=\x{2202}|;
my $url4 = $url3;
$url4 =~ s/(.)/uc sprintf("%%%02x",ord($1))/eg;
print "$url4\n";
my @chars = split('',$url3);
foreach (@chars) {
        s/(.)/uc sprintf("%%%02x",ord($1))/eg;  print;
}
==========================================================

Gives output:
%22%3D%E2
%22%3D%E2%88%82

It's not sprintf's fault - simplifying $url4 above to this:
  $url4 =~ s/(.)/ord($1).' '/eg;
gives this output:
34 61 226 


Bye

Paolo



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to