- edited description
Strings encoded with low code-points can't be used to set text fields
Issue #15
new
Encodings which use code-points lower than \x20 (such as utf16) are not allowed by the text field pattern.
>>> from csb43 import csb43
>>> a = csb43.Account(encoding="utf16")
>>> a.shortName = "a"
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "workspace/csb43/csb43/csb43/account.py", line 301, in shortName
self._set_short_name(value)
File "workspace/csb43/csb43/utils/__init__.py", line 103, in _wrapped
check_string(pattern, *args, **kw)
File "workspace/csb43/csb43/utils/__init__.py", line 79, in check_string
) % (repr(field), repr(pattern)), strict=strict, **csbexc)
File "workspace/csb43/csb43/utils/__init__.py", line 54, in raiseCsb43Exception
raise Csb43Exception(value)
csb43.utils.Csb43Exception: Bad format: content b'\xff\xfea\x00 ' mismatches the expected format rb'^[\\x20-\\xFF]{26}$' for this field
Comments (1)
-
reporter - Log in to comment