Skip to content

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

Closed
@hellmer1234

Description

@hellmer1234

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions