From c1ab01bf0dd9d64b8a567ab8e2205829a259b816 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" Date: Sat, 22 May 2010 18:02:48 +0000 Subject: [PATCH] Bug 510147: Some product names can trigger "Wide character in print" warnings (make sure to open files as UTF8) r/a=mkanat git-svn-id: svn://10.0.0.236/trunk@260359 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/.bzrrev | 2 +- mozilla/webtools/bugzilla/collectstats.pl | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/mozilla/webtools/bugzilla/.bzrrev b/mozilla/webtools/bugzilla/.bzrrev index bec54cf6e35..bcfee908821 100644 --- a/mozilla/webtools/bugzilla/.bzrrev +++ b/mozilla/webtools/bugzilla/.bzrrev @@ -1 +1 @@ -7188 \ No newline at end of file +7189 \ No newline at end of file diff --git a/mozilla/webtools/bugzilla/collectstats.pl b/mozilla/webtools/bugzilla/collectstats.pl index 5f9b4eef337..d8987b2b99c 100755 --- a/mozilla/webtools/bugzilla/collectstats.pl +++ b/mozilla/webtools/bugzilla/collectstats.pl @@ -201,6 +201,10 @@ sub collect_stats { || ThrowCodeError('chart_file_open_fail', {'filename' => $file}); } + if (Bugzilla->params->{'utf8'}) { + binmode DATA, ':utf8'; + } + # Now collect current data. my @row = (today()); my $status_sql = q{SELECT COUNT(*) FROM bugs WHERE bug_status = ?}; @@ -258,6 +262,10 @@ sub get_old_data { open(DATA, '<', $file) || ThrowCodeError('chart_file_open_fail', {'filename' => $file}); + if (Bugzilla->params->{'utf8'}) { + binmode DATA, ':utf8'; + } + my @data; my @columns; my $recreate = 0;