From: Frédéric Buclin Date: Mon, 8 Mar 2010 00:50:02 +0000 (+0100) Subject: Bug 542464: Dependency graphs cannot be displayed when bug summaries contain UTF8... X-Git-Tag: bugzilla-3.6rc1~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54731e15bb22e343f69fb379a5784945f05593fc;p=thirdparty%2Fbugzilla.git Bug 542464: Dependency graphs cannot be displayed when bug summaries contain UTF8 characters r/a=mkanat --- diff --git a/showdependencygraph.cgi b/showdependencygraph.cgi index 9b3437ebc8..e73b1f6335 100755 --- a/showdependencygraph.cgi +++ b/showdependencygraph.cgi @@ -58,7 +58,7 @@ local our (%seen, %edgesdone, %bugtitles); sub CreateImagemap { my $mapfilename = shift; my $map = "\n"; - my $default; + my $default = ""; open MAP, "<$mapfilename"; while(my $line = ) { @@ -206,6 +206,10 @@ foreach my $k (keys(%seen)) { my @params; if ($summary ne "" && $cgi->param('showsummary')) { + # Wide characters cause GraphViz to die. + if (Bugzilla->params->{'utf8'}) { + utf8::encode($summary) if utf8::is_utf8($summary); + } $summary =~ s/([\\\"])/\\$1/g; push(@params, qq{label="$k\\n$summary"}); }