X-Git-Url: http://git.rot13.org/?p=virtual-ldap;a=blobdiff_plain;f=bin%2Fcsv2yaml.pl;h=71d76ec85c0354dccc95dd4ff2277684166aad78;hp=5193e1e0264bbef36ceb4ebcf9749dc962e1a408;hb=c269c67603b2f593e0688e473fe8a1f675b33cd4;hpb=438c859977af8371ff6853ae4b5f51ef6965017c diff --git a/bin/csv2yaml.pl b/bin/csv2yaml.pl index 5193e1e..71d76ec 100755 --- a/bin/csv2yaml.pl +++ b/bin/csv2yaml.pl @@ -11,14 +11,14 @@ use Data::Dump qw/dump/; use File::Slurp; use YAML qw/DumpFile/; use Text::CSV; -use Encode qw/decode/; +use Encode qw/from_to/; my $debug = 0; my $path = shift @ARGV || die "usage: $0 file.csv\n"; my $csv = read_file( $path ); -$csv = decode('utf-16', $csv); +from_to($csv, 'utf-16', 'utf-8'); my @columns;