From e2a868a8437ea9ef2cf88a5b934b28da2b8f425d Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 28 May 2010 11:01:05 +0200 Subject: Fix comirror-setup unicode handling & add test for it --- bin/comirror-setup | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bin') diff --git a/bin/comirror-setup b/bin/comirror-setup index 03bf0a5..879c32c 100755 --- a/bin/comirror-setup +++ b/bin/comirror-setup @@ -29,9 +29,12 @@ my @opts = ( local $| = 1; +binmode(STDOUT, ':utf8'); + sub hash_to_file { my ($hash, $file) = @_; open(my $fh, '>', $file) or die("Can't open $file for writing: $!\n"); + binmode($fh, ':utf8'); while (my ($key, $value) = each(%{$hash})) { $key =~ tr/-/_/; print {$fh} "$key\t$value\n"; -- cgit v1.2.3