http://qs321.pair.com?node_id=1222481


in reply to Text::CSV_XS and encoding

The Data::Dumper output is correct, but it is showing the escaped characters - for example \x{f4} is the "latin small letter o with circumflex".

I suggest you try printing to a file like this:

open my $in, "<:encoding(UTF-8)", "in_file.csv" or die "in_file.csv $!"; my $aoh = csv( in => $in ); close $in; open my $out, ">:encoding(UTF-8)", "out_file.txt" or die "out_file.txt $!"; for my $hash (@$aoh) { while (my($key,$val) = each %$hash) { print $out "$key => $val\n"; } } close $out;