From aeb4114bd0d8dbd0761f6af58f4c275516925a3b Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Tue, 12 Apr 2011 20:16:57 +1200 Subject: [PATCH] Bug 5917 : Fix for xgettext.pl (cherry picked from commit 8df93d61bc4160f2d7618ca86319a6cda62b4e94) Signed-off-by: Chris Nighswonger --- misc/translator/xgettext.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/translator/xgettext.pl b/misc/translator/xgettext.pl index abe315e5d7..ae2eb64c2b 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"); -- 2.39.5