• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Problem with German Umlaut

wezetel

Active Member
I have an alpha-register and using the first letter of a field. To get the first letter I'm using a calc element. But as soon as the first letter is a German Umlaut I get following error message:
upload_2023-5-18_9-4-11.png


I therefore tried following code to replace the Umlaut before it will be stored:

$buchstabe= strtoupper(substr('{dienstleistungen___dienstleistung}', 0, 1));

switch ($buchstabe){
case "Ä": $buchstabe = "A";return $buchstabe;
case "Ö": $buchstabe = "O";return $buchstabe;
case "Ü": $buchstabe = "U";return $buchstabe;
default:return $buchstabe;
}

But the error remained. Any idea, what I'm doing wrong?
 
I don't get an error while returning and storing Ä in a calc.
What is your database collation, table collation and collation of the calc column?
It should all be UTF8 or so.

Your code: I assume it's still not Ä etc so always returning the original.

If you really need to convert (because of??) you can try $buchstabe=(string)$buchstabe; or some conversion like https://www.php.net/manual/de/uconverter.transcode.php
 
Collation for database, table and column is all utf8_general_ci and if I don't try to get the first letter and doing any conversion, the whole value of the referenced field ist stored...
Basically I just can't extract the first letter if it is a German Umlaut :-(
 
You're my hero...
Now I've learned: string is not always string...
mb_substr solved my problem
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top