Mercurial > hg > lukkari
changeset 36:bb00a40252e2
Input in ISO-8859-1 and output in UTF-8.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 08 Mar 2012 07:22:41 +0200 |
parents | 4d9354abda73 |
children | 3ba4feff55cb |
files | parsedata.pl |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/parsedata.pl Wed Nov 09 22:23:25 2011 +0200 +++ b/parsedata.pl Thu Mar 08 07:22:41 2012 +0200 @@ -230,7 +230,7 @@ my $data; -open(my $fh, '<', $opt_filename) or die("Error opening '$opt_filename': $!\n"); +open(my $fh, '<:encoding(iso-8859-1)', $opt_filename) or die("Error opening '$opt_filename': $!\n"); $data = do { local $/; <$fh> }; close($fh); @@ -357,6 +357,7 @@ open(STDOUT, '>', $opt_outfile) or die("Could not open output file '$opt_outfile'.\n"); } +binmode STDOUT, ':encoding(utf-8)'; ### Output data in desired format if ($opt_mode eq "php") {