codebude / QRCoder

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

Regular expression for valid contact characters is missing a plus sign #205

Closed sensorflo closed 4 years ago

sensorflo commented 5 years ago

Type of issue

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

Expected Behavior

Chapter 2.4.1 of Customer Credit Transfer Initiation (pain.001) defines that the plus character "+" is a valid character. The plus character however is missing in the regular expression at the start of QRCoder.PayloadGenerator.SwissQrCode.Contact.Contact.

Possible Solution (optional)

After the first single apostrophe "'" in the regular expression, there is a backslash followed by a space. Most probably it's meant to be a backslash followed by a plus. The space character is already included at the end of the first character set expression.

codebude commented 4 years ago

Fixed in: https://github.com/codebude/QRCoder/commit/71ee0a4071235ae15a572f98020efdd846996de1