German Umlaut in reports "Bug Fix"

Questions related to using nuBuilder Forte.

German Umlaut in reports "Bug Fix"

Unread postby paulkauz » Tue Nov 24, 2020 6:36 pm

Bildschirmfoto 2020-11-24 um 09.08.49.png
The report builder does not support the german umlaut system. (ä,ö,ü)
Bildschirmfoto 2020-11-24 um 09.08.49.png (91.5 KiB) Viewed 302 times


The FIX, which I got from kev1n:
https://github.com/tecnickcom/TCPDF/com ... 0c698756d5

Replace the function UTF8StringToArray() in the file tcpdf_fonts.php with this function:
Code: Select all
    public static function UTF8StringToArray($str, $isunicode=true, &$currentfont) {
        if ($isunicode) {
            // requires PCRE unicode support turned on
            $chars = TCPDF_STATIC::pregSplit('//','u', $str, -1, PREG_SPLIT_NO_EMPTY);
            $carr = array_map(array('TCPDF_FONTS', 'uniord'), $chars);
        } else {
            $chars = str_split($str);
            $carr = array_map('ord', $chars);
        }
        if (is_array($currentfont['subsetchars']) && is_array($carr)) {
            $currentfont['subsetchars'] += array_fill_keys($carr, true);
        } else {
            $currentfont['subsetchars'] = array_merge($currentfont['subsetchars'], $carr);
        }
        return $carr;
    }


The file is located here: \tcpdf\include\tcpdf_fonts.php
Last edited by paulkauz on Wed Nov 25, 2020 5:17 am, edited 1 time in total.
If you like nuBuilder, please leave a review on SourceForge
paulkauz
 
Posts: 30
Joined: Sat Oct 31, 2020 3:38 am

Re: German Umlaut in reports "Bug Fix"

Unread postby admin » Wed Nov 25, 2020 2:17 am

paulkauz,

I'm not sure exactly what you mean.

kev1n's fix seems to be removing the += and replacing it with just =.

Is that correct?


Steven
admin
Site Admin
 
Posts: 3406
Joined: Mon Jun 15, 2009 9:53 am
nuBuilder Version: 4.5

Re: German Umlaut in reports "Bug Fix"

Unread postby paulkauz » Wed Nov 25, 2020 3:08 am

Report.png
Umlaut (ä,ö,ü)
Report.png (64.58 KiB) Viewed 285 times

If I use in labels the german Umlaute, the report generator fails. (not always but in most cases. at the moment one label works with the Umlaut, all others don't)
report Umlat Fehler.png
Report error
report Umlat Fehler.png (83.01 KiB) Viewed 285 times


After the bug fix it works for all labels in the report. I can exchange for example the "Verlae. bis" by "Verlängert bis" and it works fine.
If you like nuBuilder, please leave a review on SourceForge
paulkauz
 
Posts: 30
Joined: Sat Oct 31, 2020 3:38 am

Re: German Umlaut in reports "Bug Fix"

Unread postby kev1n » Wed Nov 25, 2020 11:52 am

admin wrote:kev1n's fix seems to be removing the += and replacing it with just =.


Actually this is not my fix, it's an official bugfix in the github repository and it fixes the issue "Fix unsupported operand types error when codepoints arrays are merged…" that Paul had.

The difference between nuBuilder's version and the fixed one is more than += replaced with = .


I used https://www.diffnow.com/ to easily find the differences:

difference.png
difference.png (31.7 KiB) Viewed 280 times
If you like nuBuilder, please leave a review on SourceForge

nuBuilder Code Library (85)
Installation Guides
Updating nuBuilder

Join Discord to talk about nuBuilder!
kev1n
nuBuilder Team
 
Posts: 1357
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: German Umlaut in reports "Bug Fix"

Unread postby kev1n » Sun Dec 06, 2020 6:16 pm

Added this to my Bug Tracker to keep track of this issue:

https://github.com/smalos/nuBuilder4-Bu ... ToArray.md
If you like nuBuilder, please leave a review on SourceForge

nuBuilder Code Library (85)
Installation Guides
Updating nuBuilder

Join Discord to talk about nuBuilder!
kev1n
nuBuilder Team
 
Posts: 1357
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: German Umlaut in reports "Bug Fix"

Unread postby apmuthu » Sun Dec 06, 2020 10:43 pm

apmuthu
 
Posts: 224
Joined: Sun Dec 06, 2020 3:20 pm
Location: Chennai, India, Singapore

Re: German Umlaut in reports "Bug Fix"

Unread postby admin » Mon Dec 07, 2020 6:18 am

Hi, everyone.

I've been sick for a few days.

I'll get back to the forum as soon as I can (probably a week).

(Please pass this on)

Steven
admin
Site Admin
 
Posts: 3406
Joined: Mon Jun 15, 2009 9:53 am
nuBuilder Version: 4.5

Re: German Umlaut in reports "Bug Fix"

Unread postby kev1n » Mon Dec 07, 2020 6:15 pm

Hi Steven,

May you have a speedy recovery and get well soon!
If you like nuBuilder, please leave a review on SourceForge

nuBuilder Code Library (85)
Installation Guides
Updating nuBuilder

Join Discord to talk about nuBuilder!
kev1n
nuBuilder Team
 
Posts: 1357
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: German Umlaut in reports "Bug Fix"

Unread postby nac » Mon Dec 07, 2020 6:51 pm

Hello Steven,

Likewise, all the best from me. I hope you get well very soon.
Take care.

Neil

PS absolutely nothing at all to add on the German Umlaut fix.
nac
 
Posts: 65
Joined: Wed Dec 13, 2017 7:58 am
Location: Aberdeen, UK

Re: German Umlaut in reports "Bug Fix"

Unread postby Janusz » Mon Dec 07, 2020 9:54 pm

Hi Steven,
I wish You quick recovery.
And see you soon back on the forum.
If you like nuBuilder, please leave a review on SourceForge
Janusz
nuBuilder Team
 
Posts: 446
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland
nuBuilder Version: 4.5

Next

Return to General

Who is online

Users browsing this forum: No registered users and 12 guests

cron