Special characters in report output

Special characters in report output

Postby Fike » Wed Oct 22, 2014 8:07 am

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
Fike
 
Posts: 79
Joined: Fri Oct 21, 2011 4:43 am

Re: Special characters in report output

Postby roaridse » Tue Oct 28, 2014 6:50 pm

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
roaridse
 
Posts: 6
Joined: Fri Jan 18, 2013 4:22 pm

Re: Special characters in report output

Postby admin » Wed Nov 05, 2014 8:21 am

roar,

What character sets are you using in your tables?

Steven
admin
Site Admin
 
Posts: 3079
Joined: Mon Jun 15, 2009 9:53 am

Re: Special characters in report output

Postby roaridse » Mon Nov 17, 2014 7:35 pm

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
roaridse
 
Posts: 6
Joined: Fri Jan 18, 2013 4:22 pm

Re: Special characters in report output

Postby kkatsaros » Thu Nov 20, 2014 11:05 pm

Same here (with greek special characters). All of my tables are utf8_general_ci.
Any ideas?
Kostas
kkatsaros
 
Posts: 12
Joined: Thu Sep 25, 2014 9:28 pm

Re: Special characters in report output

Postby admin » Thu Nov 27, 2014 6:38 am

Kostas,

Do they read correctly in phpmyadmin?

Steven
admin
Site Admin
 
Posts: 3079
Joined: Mon Jun 15, 2009 9:53 am

Re: Special characters in report output

Postby kkatsaros » Fri Nov 28, 2014 2:17 am

Yes Steven, this is what I get on the pdf:
nureport.png
nureport.png (1.26 KiB) Viewed 12469 times

and this is the third column of the same query in phpMyAdmin:
phpMyAdmin.png
phpMyAdmin.png (4.01 KiB) Viewed 12469 times

The first column on the pdf is a label.
Kostas
kkatsaros
 
Posts: 12
Joined: Thu Sep 25, 2014 9:28 pm

Re: Special characters in report output

Postby admin » Thu Dec 04, 2014 7:18 am

Kostas,

Have you tried other fonts.

I don't know, can you send me a table to test?

Steven
admin
Site Admin
 
Posts: 3079
Joined: Mon Jun 15, 2009 9:53 am

Re: Special characters in report output

Postby nekpap » Tue Dec 23, 2014 2:32 am

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) :cry:

Please Help!
nekpap
 
Posts: 27
Joined: Wed Dec 03, 2014 4:11 pm

Re: Special characters in report output

Postby nekpap » Tue Dec 23, 2014 2:51 am

This must be a problem of FPDF please take a look at : http://stackoverflow.com/questions/6334 ... ing-how-to
nekpap
 
Posts: 27
Joined: Wed Dec 03, 2014 4:11 pm

Next

Return to Report Writer