in reply to Converting string literal represetation of utf to utf8

A simple search and replace won't do, by the way.

Why not? What have you tried?

  • Comment on Re: Converting string literal represetation of utf to utf8

Replies are listed 'Best First'.
Re^2: Converting string literal represetation of utf to utf8
by djihed (Novice) on Jun 17, 2011 at 10:27 UTC
    What didn't work:
    my $a = "\\xC4\\x80"; utf8::decode($a); # does not work, \\x are literal ascii. # is still the same. $a =~ s/\\x(\w\w)/\x$1/g; # Does not work. \x is interpreted withou +t the code points.