[ZBX-7965] GD and national chars/special chars in graphs Created: 2014 Mar 19 Updated: 2017 May 30 |
|
Status: | Reopened |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 2.3.0 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Trivial |
Reporter: | Janis Eisaks | Assignee: | Unassigned |
Resolution: | Unresolved | Votes: | 0 |
Labels: | gd | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
up-to-date Slackware64-14.0, php 5.3.27, apache 2.4.3, gd 2.0.34 |
Issue Links: |
|
Description |
Hi! I tried to use one solution found on internet by adding the lines $string = mb_convert_encoding($string, "HTML-ENTITIES", "UTF-8"); to the function imageText in graphs.inc.php; but that solved just a half of the problem - national chars are displayed correctly, but not the symbols (it seems there is no entity mapping). Where could I look in order to find the root of the problem? Janis P.S. Directive Local Value Master Value php configure options |
Comments |
Comment by Oleksii Zagorskyi [ 2014 Mar 20 ] |
We are sorry, but this is zabbix issue tracker. Ask help on community https://www.zabbix.org/wiki/Docs/bug_reporting_guidelines |
Comment by Oleksii Zagorskyi [ 2014 Mar 20 ] |
Well, point is - why do you compile PHP from sources (not very common case) and complains that something wrong with zabbix code? I'm sure (just have checked it) that the symbols are rendered correctly. You may use zabbix appliance to check the symbols and step by step find what is wrong on your side. |
Comment by Oleksii Zagorskyi [ 2014 Mar 20 ] |
Reopened according to Rich's suggestion. |
Comment by Janis Eisaks [ 2014 Mar 20 ] |
The reason behind php compilation is simple - it does not include PostgreSQL support. At least - on the distro I am used to for more that 10 years. There is no question about abandoning postgres, because is is the sole DB my spell checking development site relies on (not developed by me but, aacording to author, heavily relying on unique postgres language-related functions). I have to admin that the described effect is also seen on fresh Slackware installations (for example - it was also the case for the virtual server farm I had opportunity to demonstrate to Zabbix team two weeks ago). Janis |
Comment by Janis Eisaks [ 2014 Mar 20 ] |
P.S. Just few minutes ago I upgraded libgd to 2.1.0 and re-built the php (5.3.27) - no changes. With the php hack mentioned before I can at least get Latvian letters on graphs, but it does not explain "selectivity" of solution. Janis |
Comment by Janis Eisaks [ 2014 Mar 21 ] |
Solution (for now) for the case one has to use php 5.3 and had to rebuild his php v.5.3.x PHP Warning: imagettftext(): any2eucjp(): invalid code in input string So, in order to get mentioned chars displayed correctly, one has to remove --enable-gd-jis-conv from php configure parameters. Janis |
Comment by richlv [ 2014 Mar 21 ] |
hmm. might be worth adding some tests in the config wizard, but we should figure out how japanese users are configuring php |
Comment by Oleksii Zagorskyi [ 2014 Mar 22 ] |
I recall exactly the same issue on zabbix forum (on russian), tried to find it but without success. |
Comment by Kodai Terashima [ 2014 Mar 24 ] |
We don't do anything for Japanese, just replace font file. I found an information --enable-gd-jis-conv option try to convert utf8 to shift-jis, but imagettftext use utf8. Characters that are shown as images garbled if the compile option is enabled. |
Comment by richlv [ 2014 Apr 08 ] |
so we should probably prohibit gd jis conversion in the config wizard |