Page 1 of 1

German special letters in reports

Posted: Mon Jun 20, 2016 8:45 pm
by TirasX
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.

Re: German special letters in reports

Posted: Tue Jun 21, 2016 1:39 am
by admin
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

Re: German special letters in reports

Posted: Thu Jun 23, 2016 9:46 pm
by TirasX
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.
Image

And here is the print. The same letter is printed correctly as field.
Image

Re: German special letters in reports

Posted: Mon Jul 04, 2016 1:07 am
by TirasX
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.

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");
            		}
		}
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.

Code: Select all

$label        = str_replace('#street#',      mb_convert_encoding('Straße', "WINDOWS-1252", "UTF-8"), $label);

Re: German special letters in reports

Posted: Wed Oct 04, 2017 10:02 am
by Qressor
And here is the print. The same letter is printed correctly as field.
sbobet link