diff options
author | 2010-05-22 19:56:53 +0200 | |
---|---|---|
committer | 2010-05-22 19:56:53 +0200 | |
commit | e0d724fb7e0fd5de05417badfea8b9b9fa248cd7 (patch) | |
tree | f4c8409f58837cd728914366ec2f844410238f5e /collectstats.pl | |
parent | Bug 565879: Merge ThrowCodeError("action_unrecognized"), ThrowUserError("no_v... (diff) | |
download | bugzilla-e0d724fb7e0fd5de05417badfea8b9b9fa248cd7.tar.gz bugzilla-e0d724fb7e0fd5de05417badfea8b9b9fa248cd7.tar.bz2 bugzilla-e0d724fb7e0fd5de05417badfea8b9b9fa248cd7.zip |
Bug 510147: Some product names can trigger "Wide character in print" warnings (make sure to open files as UTF8)
r/a=mkanat
Diffstat (limited to 'collectstats.pl')
-rwxr-xr-x | collectstats.pl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/collectstats.pl b/collectstats.pl index 5f9b4eef3..d8987b2b9 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; |