codebude / QRCoder

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

Regex apostrophe dosn't match with Adress #388

Closed Seekny closed 5 months ago

Seekny commented 2 years ago

Hello,

i found an issue when im trying to add a new Client with the method : SwissQrCode.Contact.WithStructuredAddress();

There is a Regex as define in the library like : @"^([a-zA-Z0-9.,;:'\ +-/()?*[]{}\`´~ ]|[!""#%&<>÷=@_$£]|[àáâäçèéêëìíîïñòóôöùúûüýßÀÁÂÄÇÈÉÊËÌÍÎÏÒÓÔÖÙÚÛÜÑ])*$" on the Street parameter.

When i had the follow string 'Route du Poirier à l’âne', i got the exception :

"Name must match the following pattern as defined in pain.001: {charsetPattern}"

It appears that the apostrophe between the l & âne is not valid.

Is it possible to add this apostrophe : < ’ > ?

Sorry for bad english

codebude commented 5 months ago

This should be fixed by https://github.com/codebude/QRCoder/pull/432 which is part of the QRCoder 1.5.0 release.