From: Tara L Andrews Date: Wed, 21 May 2014 14:17:16 +0000 (+0000) Subject: turn char string into byte string before opening on FH. Addresses #23 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f6b3690c897e38f0df4c5f2ff9856bd39df68dc8;p=scpubgit%2Fstemmatology.git turn char string into byte string before opening on FH. Addresses #23 --- diff --git a/analysis/lib/Text/Tradition/StemmaUtil.pm b/analysis/lib/Text/Tradition/StemmaUtil.pm index 9f0a408..f7410bc 100644 --- a/analysis/lib/Text/Tradition/StemmaUtil.pm +++ b/analysis/lib/Text/Tradition/StemmaUtil.pm @@ -5,7 +5,7 @@ use warnings; use Exporter 'import'; use vars qw/ @EXPORT_OK /; use Bio::Phylo::IO; -use Encode qw( decode_utf8 ); +use Encode qw( encode_utf8 decode_utf8 ); use File::chdir; use File::Temp; use File::Which; @@ -51,6 +51,7 @@ sub read_graph { } # Now open a filehandle onto the string and pass it to Graph::Reader::Dot. + $dotstr = encode_utf8( $dotstr ); my $dotfh; open $dotfh, '<', \$dotstr; binmode $dotfh, ':utf8';