diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2010-05-28 11:01:05 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2010-05-28 11:01:05 +0200 |
commit | e2a868a8437ea9ef2cf88a5b934b28da2b8f425d (patch) | |
tree | bc6c0dd2f3f7ee0f49aa31c046865d48446eae3b /bin | |
parent | 1215c13c45be9ab1d9fcfec45b63475449d48487 (diff) |
Fix comirror-setup unicode handling & add test for it
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/comirror-setup | 3 |
1 files changed, 3 insertions, 0 deletions
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"; |