From: Tara L Andrews Date: Tue, 4 Oct 2011 00:01:16 +0000 (+0200) Subject: assume UTF-8 on tabular files X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bb11025b5dc47967b1c7e5fd1b2669b434dd0b45;p=scpubgit%2Fstemmatology.git assume UTF-8 on tabular files --- diff --git a/lib/Text/Tradition/Parser/Tabular.pm b/lib/Text/Tradition/Parser/Tabular.pm index 64b1575..1ccf8d2 100644 --- a/lib/Text/Tradition/Parser/Tabular.pm +++ b/lib/Text/Tradition/Parser/Tabular.pm @@ -97,7 +97,9 @@ sub parse { } } } elsif( exists $opts->{'file'} ) { - open( my $fh, $opts->{'file'} ) or die "Could not open input file " . $opts->{'file'}; + open( my $fh, $opts->{'file'} ) + or warn "Could not open input file " . $opts->{'file'}; + binmode( $fh, ':utf8' ); while( my $row = $csv->getline( $fh ) ) { push( @$alignment_table, $row ); }