]> git.donarmstrong.com Git - bin.git/commitdiff
open files using utf8
authorDon Armstrong <don@donarmstrong.com>
Fri, 15 Jul 2016 02:56:28 +0000 (21:56 -0500)
committerDon Armstrong <don@donarmstrong.com>
Fri, 15 Jul 2016 02:56:28 +0000 (21:56 -0500)
txt2xls

diff --git a/txt2xls b/txt2xls
index 89580044f9d9670e76de4d8ffdcc60bf51abbb36..6ac3a94e3b1978476f706dfd31d0add84d76ec39 100755 (executable)
--- a/txt2xls
+++ b/txt2xls
@@ -147,7 +147,7 @@ for my $file (@ARGV) {
        $file = "STDIN";
     }
     else {
-       $fh = IO::File->new($file,'r') or
+       open($fh,'<:encoding(utf8)',$file) or
            die "Unable to open $file for reading: $!";
     }
     my $ws_name = $file;