New submission from Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: 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 <[EMAIL PROTECTED]> <http://bugs.python.org/issue3282> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com