View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
05868Bug reportsStatisticspublic2012-03-06 10:17
Reportermeridius Assigned Toc_schmitz  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version1.91+ 
Fixed in Version1.92 
Summary05868: not showing czech special characters in charts
Description

I don't know about other languages, at least in Czech, some special characters are not shown properly in charts - i mean labels of questions shown in graphs.

It displays rectangle instead of e.g. ě, ř, ů, etc.

TagsNo tags attached.
Attached Files
chart.png (19,099 bytes)   
chart.png (19,099 bytes)   
FreeSans.ttf (460,384 bytes)
statistics_function.php (166,779 bytes)
Bug heat4
Complete LimeSurvey version number (& build)11379
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMySQL 5.0.45-log
Server OS (if known)Ubuntu 11.04
Webserver software & version (if known)Apache 2.2.17
PHP Version5.3.5-1ubuntu7.7

Users monitoring this issue

There are no users monitoring this issue.

Activities

meridius

meridius

2012-03-02 10:24

reporter   ~17706

I think I know where the problem is - the font file used (I believe vera.ttf, according to statistics.php) is not supporting these characters.

Couldn't there be used FreeSans.ttf e.g.? It properly supports these characters. I tried to simply copy it to fonts/ folder and changing 'vera.ttf' to 'FreeSans.ttf' but it's still not working.

meridius

meridius

2012-03-02 10:35

reporter   ~17707

I changed every mention of vera.ttf to FreeSans.ttf in following files:
admin/statistics.php
admin/statistics_function.php
config-defaults.php
statistics_user.php
verification.php

no success. :/

Anyone?

c_schmitz

c_schmitz

2012-03-02 15:37

administrator   ~17710

Can you attach your survey .lss file please?

meridius

meridius

2012-03-02 15:43

reporter   ~17711

Sure, here it is. Don't expect anything extraordinary, just one question with some strings to check encoding.

c_schmitz

c_schmitz

2012-03-02 18:06

administrator   ~17720

Setting it once in config.php (by copying the line from config-defaults.php) is enough.
The problem is a bug in PHP which seems to be pretty persistent. There is a way to work around it though. PLease try out the attached file and report back if it works now.

meridius

meridius

2012-03-02 21:57

reporter   ~17721

Last edited: 2012-03-02 21:58

I think you included wrong file since your statistics_function.php is almost (for some spaces) identical to mine. So no, this way it is not working.

BUT !

I did what you wrote about config.php and it WORKED! I don't know why I haven't thought of it before - settings are used from config.php, not config-defaults.php

Do you think it would be possible to use FreeSans as a default font instead of vera for future versions of LimeSurvey?

--- UNTIL THIS IS FIXED FOR GOOD, HERE IS WORKAROUND I USED ---

Save FreeSans.ttf (included) in <lime_dir>/fonts/ and paste this "$chartfontfile='FreeSans.ttf';" (without outer quotes) somewhere convenient into <lime_dir>/config.php

--- END ---

Issue History

Date Modified Username Field Change
2012-03-02 09:44 meridius New Issue
2012-03-02 09:44 meridius File Added: chart.png
2012-03-02 10:24 meridius Note Added: 17706
2012-03-02 10:24 meridius File Added: FreeSans.ttf
2012-03-02 10:35 meridius Note Added: 17707
2012-03-02 15:37 c_schmitz Note Added: 17710
2012-03-02 15:37 c_schmitz Assigned To => c_schmitz
2012-03-02 15:37 c_schmitz Status new => feedback
2012-03-02 15:42 meridius File Added: limesurvey_survey_18975.lss
2012-03-02 15:43 meridius Note Added: 17711
2012-03-02 15:43 meridius Status feedback => assigned
2012-03-02 18:06 c_schmitz File Added: statistics_function.php
2012-03-02 18:06 c_schmitz Note Added: 17720
2012-03-02 18:06 c_schmitz Status assigned => feedback
2012-03-02 21:57 meridius Note Added: 17721
2012-03-02 21:57 meridius Status feedback => assigned
2012-03-02 21:58 meridius Note Edited: 17721
2012-03-06 10:17 c_schmitz Status assigned => closed
2012-03-06 10:17 c_schmitz Resolution open => fixed
2012-03-06 10:17 c_schmitz Fixed in Version => 1.92