Hello,
I have problems with labels in reports. All german special letters (umlaute like ß, ü, ö, ä) where printed wrong. When a word with them is get from datebase, it is printed corectly. What can I do to get this also work for labels.
Thank you.
Welcome to the nuBuilder forums!
Please register and login to view forums and other content only available to registered users.
Please register and login to view forums and other content only available to registered users.
German special letters in reports
-
- Site Admin
- Posts: 2784
- Joined: Mon Jun 15, 2009 2:23 am
- nuBuilder Version: 4.5
- Been thanked: 3 times
Re: German special letters in reports
TirasX,
I'm not sure, hopefully someone else has had this happen, and can help.
Are Both Fields and Labels using the same font?
Steven
I'm not sure, hopefully someone else has had this happen, and can help.
Are Both Fields and Labels using the same font?
Steven
-
- Posts: 8
- Joined: Tue Jun 14, 2016 10:29 am
Re: German special letters in reports
Hello Steven,
yes, I use on the same font (Arial). I tried also all other fonts, but the same problem.
Here is how it looks in the builder.
And here is the print. The same letter is printed correctly as field.
yes, I use on the same font (Arial). I tried also all other fonts, but the same problem.
Here is how it looks in the builder.
And here is the print. The same letter is printed correctly as field.
-
- Posts: 8
- Joined: Tue Jun 14, 2016 10:29 am
Re: German special letters in reports
Hello,
after research I found out, that nuBuilder is using fpdf to create pdf, which is not compatible with utf-8 chars. There is an alternative, that I couldn't get work properly, but I was possible to test it and my labels were printed correct.
http://www.fpdf.org/en/script/script92.php
And I also figured out why database field are printed correctly. There is an ecoding for them in nurunpdf.php.
I think, that there are now two things that could be done in the nurunpdf.php:
1. move to tfpdf
2. mb_convert_encoding for labels
Maybe the devolpers could do this. I am not skilled enough to do that.
Actually I am helping me out and use own hash variables in nurunpdf.php.
after research I found out, that nuBuilder is using fpdf to create pdf, which is not compatible with utf-8 chars. There is an alternative, that I couldn't get work properly, but I was possible to test it and my labels were printed correct.
http://www.fpdf.org/en/script/script92.php
And I also figured out why database field are printed correctly. There is an ecoding for them in nurunpdf.php.
Code: Select all
//Add the 'is_array' check by SG 8th May 2015
if ( is_array($this->ROW) ) {
if(array_key_exists($O->fieldName, $this->ROW)) {
$v = $this->nuGetFormatting($O);
$value = mb_convert_encoding($v['V'], "WINDOWS-1252", "UTF-8");
}
}
1. move to tfpdf
2. mb_convert_encoding for labels
Maybe the devolpers could do this. I am not skilled enough to do that.
Actually I am helping me out and use own hash variables in nurunpdf.php.
Code: Select all
$label = str_replace('#street#', mb_convert_encoding('Straße', "WINDOWS-1252", "UTF-8"), $label);
-
- Posts: 1
- Joined: Wed Oct 04, 2017 10:01 am
Re: German special letters in reports
And here is the print. The same letter is printed correctly as field.
sbobet link
sbobet link