Thu, 17 Aug 2006
Perl: The next level
We have ran into a problem that Data::Dumper
module escapes the UTF-8 characters as \x{codepoint}.
This is probably intended, as the result is then usable regardless of
whether the "use utf8" pragma is active or not. But it is not
much readable when the data contains lots of Czech text.
I have solved it by filtering the Data::Dumper output through
the following substitution:
s/\\x{[0-9a-f]+}/"\"$&\""/geexms
This has moved me to the next level of my Perl proficiency, as probably
for the first time I have used the "/ee" in a real-world code.