[New-bugs-announce] [issue3282] Undefined unicode characters should be non-printable
Amaury Forgeot d'Arc
report at bugs.python.org
Fri Jul 4 15:30:06 CEST 2008
New submission from Amaury Forgeot d'Arc <amauryfa at gmail.com>:
str.isprintable() returns True for undefined unicode code points:
>>> c = "\ufffe"
>>> unicodedata.category(c)
'Cn' # (Other, Not Assigned)
>>> c.isprintable()
True
Same for "\u0242", "\ufb12"...
The cause is probably in unicodectype.c: _PyUnicode_IsPrintable():
return (ctype->flags & NONPRINTABLE_MASK) == 0;
but ctype->flags is 0 for undefined chars.
----------
components: Unicode
messages: 69254
nosy: amaury.forgeotdarc
severity: normal
status: open
title: Undefined unicode characters should be non-printable
versions: Python 3.0
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3282>
_______________________________________
More information about the New-bugs-announce
mailing list