Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with validation in QRCodes with special chars (atilde and deg) #419

Closed
hellmer1234 opened this issue Sep 27, 2022 · 2 comments
Closed

Comments

@hellmer1234
Copy link

hellmer1234 commented Sep 27, 2022

Type of issue

[ X ] Bug
[ ] Question (e.g. about handling/usage)
[ ] Request for new feature/improvement

Expected Behavior

When i put ° (° , unicode equivalent U+B0) or ã (ã , unicode equivalent U+E3) in name or addressline for swissQrCode, i want the code to be generated.

Current Behavior

When trying to use char ° or ã there is an error triggered :
Name must match the following pattern as defined in pain.001: ^([a-zA-Z0-9.,;:'\ +-/()?*[]{}\`´~ ]|[!"#%&<>÷=@_$£]|[àáâäçèéêëìíîïñòóôöùúûüýßÀÁÂÄÇÈÉÊËÌÍÎÏÒÓÔÖÙÚÛÜÑ])*$
Stacktrace: at QRCoder.PayloadGenerator.SwissQrCode.Contact..ctor(String name, String zipCode, String city, String country, String streetOrAddressline1, String houseNumberOrAddressline2, AddressType addressType)

Possible Solution (optional)

Allow these specific characters in the validator scheme like it is for ñ for example

Steps to Reproduce (for bugs)

When trying the following strings in the payload, i encounter an error :

  • Contact Name : Louis Maria João Richardo
  • Address Line 1 : Avenue de l'Ile de France 6 (logement n° 115)

Your Environment

  • Compiled from source or NuGet package?: Nuget Package
  • Version used : QRCoder 1.3.9
@codebude
Copy link
Owner

Hi @hellmer1234 ,

thanks for your bug report. This was fixed in PR #411 and will be part of the QRCoder 1.5.0 release.

@hellmer1234
Copy link
Author

Many thanks for all the job @codebude
Tested version 1.5.0 and deployed into production.
I was able to generate all the previous failing cases.
Well done !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants