View Issue Details

IDProjectCategoryView StatusLast Update
0011627mantisbtrelationshipspublic2014-10-14 16:21
Reportercspmcs Assigned Tograngeway  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
Product Version1.1.8 
Summary0011627: Solution: Relationship Graph does not work with multi-byte code page
Description

In config_inc.php
$g_default_language = 'chinese_traditional';
$g_relationship_graph_enable = ON;

WinGraphViz_v1.02.24.msi is installed.

After clicking on "Relation Graph" and "Dependency Graph" near bug relationships, web browser shows "Could not convert string to unicode: No mapping for the Unicode character exists in the target multi-byte code page."

Solution: modify 2 places in \core\graphviz_api.php
Around line 314 & 329 in, change
$t_dot_output = $t_graphviz->ToBinaryGraph( $t_dot_source, $t_type );
to
$t_dot_output = $t_graphviz->ToTextGraph( mb_convert_encoding($t_dot_source, "Big5", "UTF-8"), $t_type );

Please replace "Big5" if you are using other multi-byte code page.

TagsNo tags attached.

Activities

dhx

dhx

2010-03-12 08:15

reporter   ~0024709

I don't quite understand why you're converting to Big5 encoding when GraphViz (and WinGraphViz) both support UTF-8. Can you please explain in more detail why you've done this?

FYI MantisBT is not designed to work in any encoding other than UTF-8.

cspmcs

cspmcs

2010-03-14 04:23

reporter   ~0024731

With original mantis 1.1.8 source code, if there are Traditional Chinese words in summary field, each time I click 'Relationship Graph' or 'Dependency Graph' Mantis returns an error page with message "Could not convert string to unicode: No mapping for the Unicode character exists in the target multi-byte code page."

I checked browser encoding and found that this error page was encoded in Big5.
This fact gave me a thought that maybe I should convert UTF-8 strings to Big5 first, let Mantis pass Big5 strings to WinGraphViz, and perhaps WinGraphViz or Mantis or somewhere inside PHP code will convert Big5 strings to UTF-8 again.

So I added mb_convert_encoding() in 2 places in \core\graphviz_api.php and it worked. Hope this result will help those users with multi-byte code page.

grangeway

grangeway

2014-10-03 17:52

reporter   ~0041342

We are resolving this issue as "no change required", because it was reported against an old version of MantisBT which is no longer supported.

We recommend that you upgrade to the latest stable version [1]; if after doing so the problem still exists, do not hesitate to reopen the issue.

[1] http://www.mantisbt.org/download.php