My brother came to my rescue twice, and came up with this handy script:
sub print_codes {
my $value = shift;
foreach (unpack("C*", $value)) {
print " '$_'\n";
}
}
Essentially one can pass the value of a string to
In my case, we determined that 1. the input string was in UTF-16 (from a Gmail .csv export) but was being compared to a UTF-8 string, and 2.
- Remove extra \0 characters from the UTF-16 strings (careful if you deal with other languages, though):
s/\0//g;
- Set chomp to remove
\n\r at the beginning of your code:
$/ = "\r\n";
0 comments:
Post a Comment