foreach $unicode (keys %from) {
if (defined($to{$unicode})) {
if ($from{$unicode} ne $to{$unicode}) {
my $fromchar = $from{$unicode};
my $fromchar =~ s/0x(..)/pack('c',hex($1))/ge;
$tochar = $to{$unicode};
$tochar =~ s/0x(..)/pack('c',hex($1))/ge;
$wrong = $wrong . $fromchar;
$right = $right . $tochar;
}
}
}
####
tr [\200-\377]
[\000-\177]; # delete 8th bit
####
foreach $unicode (keys %from) {
if (defined($to{$unicode})) {
if ($from{$unicode} ne $to{$unicode}) {
my $fromhex = $from{$unicode};
my $tohex = $to{$unicode};
$wrong = $wrong . '\\' .
sprintf('%o', hex $fromhex);
$right = $right . '\\' .
sprintf('%o', hex $tohex);
}
}
}