German special letters in reports

German special letters in reports

Postby TirasX » Tue Jun 21, 2016 4:15 am

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.
TirasX
 
Posts: 8
Joined: Tue Jun 14, 2016 5:59 pm

Re: German special letters in reports

Postby admin » Tue Jun 21, 2016 9:09 am

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
admin
Site Admin
 
Posts: 3153
Joined: Mon Jun 15, 2009 9:53 am

Re: German special letters in reports

Postby TirasX » Fri Jun 24, 2016 5:16 am

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
TirasX
 
Posts: 8
Joined: Tue Jun 14, 2016 5:59 pm

Re: German special letters in reports

Postby TirasX » Mon Jul 04, 2016 8:37 am

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);
TirasX
 
Posts: 8
Joined: Tue Jun 14, 2016 5:59 pm

Re: German special letters in reports

Postby Qressor » Wed Oct 04, 2017 5:32 pm

And here is the print. The same letter is printed correctly as field.
sbobet link
Qressor
 
Posts: 1
Joined: Wed Oct 04, 2017 5:31 pm


Return to Report Writer