Page 1 of 2
Special characters in report output
Posted: Wed Oct 22, 2014 12:37 am
by Fike
Hi,
I was having trouble with special characters (á, é, í, ó, ú, ñ) when prinitng a PDF report.
I ended up replacing the last line of the function nuPrintField at the nurunpdf.php file
from:
Code: Select all
$PDF->MultiCell($width, $height, implode("\n", $contents->lines), $borderWidth == 0 ? 0 : 1, $textAlign, true);
to:
Code: Select all
$text = implode("\n", $contents->lines);
$text = utf8_decode($text);
$PDF->MultiCell($width, $height, $text, $borderWidth == 0 ? 0 : 1, $textAlign, true);
Hope this helps someone having the same issue.
Kind regards,
Fike
Re: Special characters in report output
Posted: Tue Oct 28, 2014 10:20 am
by roaridse
Hi,
This helped for static labels on my system, but special characters loaded from the query ends up as a questionmark .
My reports works great at nuBuilder 2.0, but my replicated in 3.0 have issues with the norwegian special characters.
Any suggestions how to fix this?
Regards,
Roar
Re: Special characters in report output
Posted: Tue Nov 04, 2014 11:51 pm
by admin
roar,
What character sets are you using in your tables?
Steven
Re: Special characters in report output
Posted: Mon Nov 17, 2014 11:05 am
by roaridse
Steven,
Sorry for late answer.
My tables uses latin1_swedish_ci as default.
I tried to convert one table to utf8_general_ci , without any differences.
The zzz_tables uses utf8_general_ci , and before applying the codechanges from Fike i also had problems with several characters on lables in the report. Now it's just the data from my tables which is replaced with a questionmark.
Roar
Re: Special characters in report output
Posted: Thu Nov 20, 2014 2:35 pm
by kkatsaros
Same here (with greek special characters). All of my tables are utf8_general_ci.
Any ideas?
Re: Special characters in report output
Posted: Wed Nov 26, 2014 10:08 pm
by admin
Kostas,
Do they read correctly in phpmyadmin?
Steven
Re: Special characters in report output
Posted: Thu Nov 27, 2014 5:47 pm
by kkatsaros
Yes Steven, this is what I get on the pdf:
- nureport.png (1.26 KiB) Viewed 30218 times
and this is the third column of the same query in phpMyAdmin:
- phpMyAdmin.png (4.01 KiB) Viewed 30218 times
The first column on the pdf is a label.
Re: Special characters in report output
Posted: Wed Dec 03, 2014 10:48 pm
by admin
Kostas,
Have you tried other fonts.
I don't know, can you send me a table to test?
Steven
Re: Special characters in report output
Posted: Mon Dec 22, 2014 6:02 pm
by nekpap
Same problem with greek special characters!
Teke into account this problem, I can't build any report (all my tables have greek special characters - utf8_general_ci)
Please Help!
Re: Special characters in report output
Posted: Mon Dec 22, 2014 6:21 pm
by nekpap
This must be a problem of FPDF please take a look at :
http://stackoverflow.com/questions/6334 ... ing-how-to