Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

German Umlaut in reports "Bug Fix"

Questions related to using nuBuilder Forte.
paulkauz
Posts: 30
Joined: Fri Oct 30, 2020 7:08 pm

German Umlaut in reports "Bug Fix"

Unread post by paulkauz »

Bildschirmfoto 2020-11-24 um 09.08.49.png
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
You do not have the required permissions to view the files attached to this post.
Last edited by paulkauz on Tue Nov 24, 2020 8:47 pm, edited 1 time in total.
If you like nuBuilder, please leave a review on SourceForge
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: German Umlaut in reports "Bug Fix"

Unread post by admin »

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
paulkauz
Posts: 30
Joined: Fri Oct 30, 2020 7:08 pm

Re: German Umlaut in reports "Bug Fix"

Unread post by paulkauz »

Report.png
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
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.
You do not have the required permissions to view the files attached to this post.
If you like nuBuilder, please leave a review on SourceForge
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: German Umlaut in reports "Bug Fix"

Unread post by kev1n »

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
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: German Umlaut in reports "Bug Fix"

Unread post by kev1n »

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

https://github.com/smalos/nuBuilder4-Bu ... ToArray.md
apmuthu
Posts: 249
Joined: Sun Dec 06, 2020 6:50 am
Location: Chennai, India, Singapore

Re: German Umlaut in reports "Bug Fix"

Unread post by apmuthu »

admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: German Umlaut in reports "Bug Fix"

Unread post by admin »

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
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: German Umlaut in reports "Bug Fix"

Unread post by kev1n »

Hi Steven,

May you have a speedy recovery and get well soon!
nac
Posts: 115
Joined: Tue Dec 12, 2017 11:28 pm
Location: Aberdeen, UK
Has thanked: 9 times
Been thanked: 12 times

Re: German Umlaut in reports "Bug Fix"

Unread post by nac »

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.
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: German Umlaut in reports "Bug Fix"

Unread post by Janusz »

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
Post Reply