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
This commit is contained in:
mkanat%bugzilla.org
2010-05-22 18:02:48 +00:00
parent 4c3f495eec
commit c1ab01bf0d
2 changed files with 9 additions and 1 deletions

View File

@@ -1 +1 @@
7188
7189

View File

@@ -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;