Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- my $line = shift;
- my $tamanho = shift;
- my $nline = NFD($line);
- $nline =~ s/[^[:print:]+]//g;
- $nline =~ s/[x7F-xFF]+//g;
- $nline =~ s/([^[:ascii:]]+)/unidecode($1)/ge;
- $nline =~ s/[x00]//g;
- $nline =~ s/^s+|s+$//g;
- $nline .= (" " x ($tamanho - length($nline)));
- $line =~ s/^s+|s+$//g;
- $line .= (" " x ($tamanho - length($line)));
- if ($line ne $nline) {
- print "n$.n";
- print "ERA ==> $linen";
- print "NOV ==> $nlinen";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement