I have a literal string like this:
C\303\263pia de DECLARA\303\207\303\203O
and i need to convert it in:
Cópia de DECLARAÇÃO
How to do it in PERL?
Save me dudes!
=)
SOLVED:
Code:
my $string = 'C\303\263pia de DECLARA\303\207\303\203O';
$string =~ s/\\(0-7+)/chr oct $1/eg;
print "$string\n";
OUTPUT:
Cópia de DECLARAÇÃO
Tks GUYS!
In reply to How to convert octal non printable chars in a string? by platbr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |