Created
June 15, 2013 22:58
-
-
Save false-git/5789901 to your computer and use it in GitHub Desktop.
zabbix2 のグラフの文字化け対策
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** graphs.inc.php.orig Sat Jun 15 23:17:46 2013 | |
--- graphs.inc.php Sun Jun 16 07:54:35 2013 | |
*************** | |
*** 666,671 **** | |
--- 666,674 ---- | |
imagettftext($image, $fontsize, $angle, $x, $y, $color, $ttf, $string); | |
} | |
elseif ($angle == 0) { | |
+ if ($gdinfo['JIS-mapped Japanese Font Support']){ | |
+ $string = mb_convert_encoding($string, "SJIS", "UTF-8"); | |
+ } | |
$ttf = ZBX_FONTPATH.'/'.ZBX_GRAPH_FONT_NAME.'.ttf'; | |
imagettftext($image, $fontsize, $angle, $x, $y, $color, $ttf, $string); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment