Hi,
You don't need to post the real data, just an example that demonstrates the problem and lets us reproduce it. See How do I post a question effectively? and Short, Self Contained, Correct (Compatible) Example.
Some general tips:
- Look at the raw data in the file, e.g. hexdump -C FILENAME or od -Ax -tx1z FILENAME, and verify which character encoding is in use.
- When opening the file, make sure to specify the correct encoding layer, e.g. open my $fh, '<:encoding(UTF-8)', $filename or die $!;
- When inspecting the data in Perl, don't use print, use either use Data::Dumper; $Data::Dumper::Useqq=1; print Dumper($data);, use Data::Dump 'pp'; pp $data;, or for a really detailed look use Devel::Peek; Dump( $data );
When explaining the problem here, post all three of the above, that is, a few lines of the hex dump, the code you're using, and the output of one of the dumper modules.
Hope this helps, -- Hauke D
| [reply] [d/l] [select] |