From: Frédéric Buclin Date: Sat, 22 May 2010 18:00:04 +0000 (+0200) Subject: Bug 510147: Some product names can trigger "Wide character in print" warnings (make... X-Git-Tag: bugzilla-3.6.1~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e80f38a1215254aba4b83cbef23d4582e434545;p=thirdparty%2Fbugzilla.git Bug 510147: Some product names can trigger "Wide character in print" warnings (make sure to open files as UTF8) r/a=mkanat --- diff --git a/collectstats.pl b/collectstats.pl index 5f9b4eef33..d8987b2b99 100755 --- a/collectstats.pl +++ b/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;