in reply to Re \x {} junk
in thread Getting rid of \x junk
I think you might be looking for the solution others provided me just recently for almost the exact same issue. In my case, the trick turned out to be a two-step process. You will find the details to the solution here:
Perl's encoding versus UTF8 octetsThe crux of it was this:
$mytext =~ s!\\x(..)!chr(hex($1))!ge; my $newcode = decode('utf8', $mytext);
Note the substitution followed by the decode.
Blessings,
~Polyglot~
|
|---|