Closed Quantoniz0r closed 2 months ago
I fully agree. That would have saved some hours of my time. Without this parameter set the generated QR bill is quite useless, since it is invalid.
The funny thing is: all tested banking apps don't care about UTF-8 and process the QR bill just fine. As far as I know only the validator websites are complaining.
Thanks for your feedback. I updated the sample code in the Wiki entry and added an additional note on the necessity of the forceUtf8 parameter. https://github.com/codebude/QRCoder/wiki/Advanced-usage---Payload-generators#318-swissqrcode-iso-20022
Type of issue
[ ] Bug
[ ] Question (e.g. about handling/usage)
[x] Request for new feature/improvement
Request to change / add info on wiki
https://github.com/codebude/QRCoder/wiki/Advanced-usage---Payload-generators#318-swissqrcode-iso-20022
In the "How to use it - simple way" code snippet, please add true for the forceUtf8 parameter in the call qrGenerator.CreateQrCode(...
In the "Good to know" section, please add the info, that the forceUtf8 parameter should be set to true when using this payload generator, otherwise QR bills containing umlauts (ä / ö / ü) will be validated with errors, as UTF8 is mandatory as stated in the official documentation.
Reason for request
If the parameter forceUtf8 is not set, umlauts (ä / ö / ü) are encoded in ISO-8859-1. The official QR bill validators will report this as wrong, as UTF-8 is mandatory.