Closed mixgiogio closed 2 years ago
when i scan the qr code with banking mobile app or with dedicate scanner linked on pc the auto-populated fields show uncoded characters (for example: Röli ....
What do those names originally look like? Could it be that you encode them into html entities before adding them to the qr code?
I retreive this value from a mysql database, this is the originary field stored in table "Röli, Muff, Schöpfer"... R& o u m l ;li, Muff, Sch & o u m l ; pfer... I added spaces because in the preview it is shown already encoded
Hi, Info I work as well datas with non-ascii in the Street adresse ... (" Châtelet , Südstrasse, Mâche ..." ) I have no problem to generate and decode the qr code.
[https://www.php.net/manual/de/function.utf8-encode.php]
I suspect your data comes from a database. At least I have the same problem in this case, which I could solve with utf8_encode( 'Südstrasse' ).
Ich vermute, deine Daten kommen stammen aus einer Datenbank. Zumindest habe ich in diesem Fall das selbe Problem gehabt, das ich mit utf8_encode( 'Südstrasse' ) lösen konnte.
Hi, resolved with html_entity_decode()
Thanks ;)
I had this same problem. I solved it with \Normalizer::normalize()
(PECL intl)
\Normalizer::normalize() (PECL intl)
Can you please show a code snippet of your solution. Thank you.
Because: utf8_encode - Convert a string from ISO-8859-1 to UTF-8 Warning: This function is DEPRECATED as of PHP 8.2.0. It is strongly discouraged to use this function.
Just like that:
$qrBill->setCreditor(
QrBill\DataGroup\Element\CombinedAddress::create(
\Normalizer::normalize('Röli Schöpfer'),
\Normalizer::normalize('Rue du Lac 1268'),
\Normalizer::normalize('2501 Biel'),
'CH'
));
Hi,
First of all, thanks for this precious library!
I report below the error that I encountered after generating the qr code.
Step1: i generete the qrcode and i use this methods:
in some of this field i have a special char like ä,ö and ü (for example Röli, Muff, Schöpfer).
Step 2: when i show the Swiss QR Bill payment in pdf i see correctly this special chars
Step 3: when i scan the qr code with banking mobile app or with dedicate scanner linked on pc the auto-populated fields show uncoded characters (for example: Röli ....