summaryrefslogtreecommitdiff
path: root/rhimport.pm
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2012-07-02 13:29:39 (GMT)
committerChristian Pointner <equinox@helsinki.at>2012-07-02 13:29:39 (GMT)
commit3be2e82bf84ba9036dec99e5671393a6e343588d (patch)
treea0d4007057a4ed81969a9591d0f2a7055cb1cb2b /rhimport.pm
parentcc9a70c6ea2e4dbf8e19205eae6f0cf4f1d23051 (diff)
switch all files to utf8
Diffstat (limited to 'rhimport.pm')
-rw-r--r--rhimport.pm7
1 files changed, 7 insertions, 0 deletions
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 = <FILE>) {
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 = "";