You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The characters « and » are very common in Switzerland, but are not allowed within qr code contents.
Here is an example from the validator, giving the regex to check against:
Error: value 'Verein «Beispielname»' does not match regular expression facet '([a-zA-Z0-9\.,;:'\+\-/\(\)?\*\[\]\{\}\|\\`´~ ]|[!"#%&<>÷=@_$£^]|[àáâäçèéêëìíîïñòóôöùúûüýßÀÁÂÄÇÈÉÊËÌÍÎÏÒÓÔÖÙÚÛÜÑ])*'
To consider: Do we want to implement some auto-replacement for invalid characters within the library to make string handling as easy as possible for developers?
The text was updated successfully, but these errors were encountered:
Instead of throwing an exception, just striping the chars seems more developer-friendly to me (= replace with empty string).
If developers wants specific replacement characters, they can replace them before passing the string to the library. Bonus points if this replcement function is part of the public package API, so they can use it as well and maybe pass a callback to it (like preg_replace_callback()?
I prepared a solution for this in #255.
I tried to keep providing replacements for unsupported characters as simple as possible, as I imagine most devs will only want to replace a handful of characters, if any at all.
The characters
«
and»
are very common in Switzerland, but are not allowed within qr code contents.Here is an example from the validator, giving the regex to check against:
To consider: Do we want to implement some auto-replacement for invalid characters within the library to make string handling as easy as possible for developers?
The text was updated successfully, but these errors were encountered: