diff --git a/misc/translator/xgettext.pl b/misc/translator/xgettext.pl index ef1fb3db4a..f2ab7ccc23 100755 --- a/misc/translator/xgettext.pl +++ b/misc/translator/xgettext.pl @@ -341,7 +341,8 @@ usage_error('You cannot specify both --convert-from and --files-from') if (defined $output && $output ne '-') { print STDERR "$0: Opening output file \"$output\"\n" if $verbose_p; - open(OUTPUT, ">$output") || die "$output: $!\n"; + open(OUTPUT, ">$output") || die "$output: $!\n"; + binmode( OUTPUT, ":utf8" ); } else { print STDERR "$0: Outputting to STDOUT...\n" if $verbose_p; open(OUTPUT, ">&STDOUT");