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;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Text::CSV_XS and encoding
by PeterKaagman (Sexton) on Sep 17, 2018 at 17:17 UTC | |
by Tux (Canon) on Sep 17, 2018 at 20:54 UTC |
In Section
Seekers of Perl Wisdom