Help for this page

Select Code to Download


  1. or download this
    use Text::CSV::Encoded;
    my $csv = Text::CSV::Encoded->new ({
    ...
        encoding_in  => "utf-16le",   # Only the input
        encoding_out => "cp1252",     # Only the output
        });
    
  2. or download this
    binmode STDOUT, ":utf8";
    my $csv = Text::CSV_XS->new ({ binary => 1 });
    ...
    while (my $row = $csv->getline ($fh)) {
        print $row->[4];
        }