Page 1 of 2
German Umlaut in reports "Bug Fix"
Posted: Tue Nov 24, 2020 10:06 am
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
Re: German Umlaut in reports "Bug Fix"
Posted: Tue Nov 24, 2020 5:47 pm
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
Re: German Umlaut in reports "Bug Fix"
Posted: Tue Nov 24, 2020 6:38 pm
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.
Re: German Umlaut in reports "Bug Fix"
Posted: Wed Nov 25, 2020 3:22 am
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
Re: German Umlaut in reports "Bug Fix"
Posted: Sun Dec 06, 2020 9:46 am
by kev1n
Added this to my Bug Tracker to keep track of this issue:
https://github.com/smalos/nuBuilder4-Bu ... ToArray.md
Re: German Umlaut in reports "Bug Fix"
Posted: Sun Dec 06, 2020 2:13 pm
by apmuthu
Re: German Umlaut in reports "Bug Fix"
Posted: Sun Dec 06, 2020 9:48 pm
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
Re: German Umlaut in reports "Bug Fix"
Posted: Mon Dec 07, 2020 9:45 am
by kev1n
Hi Steven,
May you have a speedy recovery and get well soon!
Re: German Umlaut in reports "Bug Fix"
Posted: Mon Dec 07, 2020 10:21 am
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.
Re: German Umlaut in reports "Bug Fix"
Posted: Mon Dec 07, 2020 1:24 pm
by Janusz
Hi Steven,
I wish You quick recovery.
And see you soon back on the forum.