in reply to Perl script to transform XX-encoding to UTF-8

I'm perhaps not totally sure what you're going for, but I believe that what you're doing can also be accomplished with the following. However, well done on the port!
$string =~ s/%(..)/pack("c",hex($1))/ge;
  -Adam

Update: The CGI module seems to do this transformation correctly. Since it appears you're writing a CGI script, perhaps that module would be useful.

--
Impossible! The Remonster can only be killed by stabbing him in the heart with the ancient bone saber of Zumakalis!

Replies are listed 'Best First'.
Re^2: Perl script to transform XX-encoding to UTF-8
by emav (Pilgrim) on Jun 24, 2005 at 06:04 UTC
    I'm aware of this regex but it doesn't work with extended unicode character sets. At least, it didn't work with the accented ancient Greek characters (1F00-1FFF) that I am interested in.