From 3be2e82bf84ba9036dec99e5671393a6e343588d Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Mon, 2 Jul 2012 13:29:39 +0000 Subject: switch all files to utf8 diff --git a/rhimport.pm b/rhimport.pm index 1c7efb4..8cd609d 100644 --- a/rhimport.pm +++ b/rhimport.pm @@ -168,6 +168,7 @@ sub import_playlist print "Starting import from playlist $playlist to $dropbox"; my @entries; open (FILE, $playlist) or die "can't open playlist $playlist: $!"; + binmode(FILE, ":utf8"); while (my $entry = ) { next if($entry =~ /^#/); next if($entry =~ /^\s/); @@ -240,6 +241,9 @@ sub scp_put_file $writer->autoflush(1); local $SIG{CHLD} = 'DEFAULT'; my $pid = open3($writer, $reader, $error, @cmd); + binmode($reader, ":utf8"); + binmode($writer, ":utf8"); + binmode($error, ":utf8"); waitpid $pid, 0; my $errstr = ""; if ( $? >> 8 ) { @@ -256,6 +260,9 @@ sub ssh_exec_command $writer->autoflush(1); local $SIG{CHLD} = 'DEFAULT'; my $pid = open3($writer, $reader, $error, @cmd); + binmode($reader, ":utf8"); + binmode($writer, ":utf8"); + binmode($error, ":utf8"); waitpid $pid, 0; my $out = join('', <$reader>); my $errstr = ""; -- cgit v0.10.2