codebude / QRCoder

A pure C# Open Source QR Code implementation
MIT License
4.44k stars 1.08k forks source link

SwissQrCode: Please add info to wiki to use forceUtf8:=true in CreateQrCode #405

Closed Quantoniz0r closed 2 months ago

Quantoniz0r commented 2 years ago

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.

feis1 commented 2 years 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.

Quantoniz0r commented 2 years ago

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.

codebude commented 2 months ago

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