Chinese garbled characters in Mantis reports

Source: Internet
Author: User

Chinese garbled characters in Mantis reports

1. Install the Mantis chart 1.0 plug-in

Administrator Login ------- management ------ plug-in management, install plug-in

2. Upload the simhei. ttf simsun. ttc simsun. ttf file (which can be downloaded online) to/usr/share/fonts/truetype/

3. Download jpGraph ()

# Tar zxvf jpgraph-3.5.0b1.tar.gz

# Cp src/usr/local/nginx/html/mantisbt/library/jpgraph/copy src and rename it to jpgraph./usr/local/nginx/html/mantisbt/is the website directory.

4. modify the configuration file

# Cd/usr/local/nginx/html/mantisbt/library/jpgraph

# Vim jpgraph_ttf.inc.php

183 elseif ($ aFF === FF_SIMSUN) {approximately 183 rows

184 // Do Chinese conversion
185 # if ($ this-> g2312 = null) {comment
186 # comment de_once 'jpgraph _ gb2312.php ';
187 # $ this-> g2312 = new GB2312toUTF8 (); Comment
188 #} notes
189 # return $ this-> g2312-> gb2utf8 ($ aTxt); Comment
190 return $ aTxt; add
191}

 

# Cd.../plugins/MantisGraph/core/

# Vim graph_api.php

56 if (plugin_config_get ('eczlibrary ') = ON ){
57 $ t_font_map = array (
58 'simsun' => 'simfang. ttf', add this line
59 'arial' => 'arial. ttf ',
60 'verdana '=> 'verdana. ttf ',
61 'trebucket' => 'trebuc. ttf ',
62 'verasans '=> 'vera. ttf ',
63 'times '=> 'times. ttf ',
64 'Georgia '=> 'Georgia. ttf ',
65 'veraserif' => 'verase. ttf ',
66 'courier '=> 'cour. ttf ',
67 'veramono' => 'veramono. ttf ',
68 );

85 $ t_font_map = array (
86 'simsun' => FF_SIMSUN, add this row
87 'arial' => FF_ARIAL,
88 'verdana '=> FF_VERDANA,
89 'trebucket' => FF_TREBUCHE,
90 'verasans '=> FF_VERA,
91 'times '=> FF_TIMES,
92 'Georgia '=> FF_GEORGIA,
93 'veraserif' => FF_VERASERIF,
94 'courier '=> FF_COURIER,
95 'veramono' => FF_VERAMONO,
96 );

# Cd ../pages/
# Vim config. php

24 $ t_current_font_selected = array (
25 'simsun' => false, add this line
26 'arial' => false,
27 'verdana '=> false,
28 'trebucket' => false,
29' verasans '=> false,
30 'times '=> false,
31 'Georgia '=> false,
32 'veraserif' => false,
33 'courier '=> false,
34 'veramono' => false,
35 );

121 Sans-serif:

122/> Simsun
Add this line
123/> Arial

124/> Verdana

125/> Trebuchet

126/> Vera Sans
127

# Vim config_edit.php

47 if (plugin_config_get ('font ')! = $ F_font ){
48 switch ($ f_font ){
49 case 'simsun': add this line
50 case 'arial ':
51 case 'verdana ':
52 case 'trebucket ':
53 case 'verasans ':
54 case 'times ':
55 case 'Georgia ':
56 case 'veraserif ':
57 case 'courier ':
58 case 'veramono ':
59 plugin_config_set ('font', $ f_font );
60 break;
61 default:

5. Set the report font to

Administrator Login ----------- management ---------- plug-in management --------- Mantis chart 1.0

6. Refresh the report and you can see that Chinese is displayed normally.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.