Is there any Perl XS module with high-speed subroutines suitable for encoding/decoding of the non-standard %uXXXX unicode characters found in unicode cookies (especially Firefox)?
decoding: input = …%uXXXX… , output = a normal utf8 Perl string
encoding: input = a normal utf8 Perl string, output = …%uXXXX…
Now I’m decoding these strings using this code:
$string =~ s/%u([A-Fa-f0-9]{4})/chr(hex($1))/eg;
but it would be nice to have a C-implemented version of it.
How about two?
URL::Encode::XS also exists, but does not meet the requirement.