[issue4426] UTF7 decoding is far too strict

Nick Barnes report at bugs.python.org
Tue Nov 25 14:09:23 CET 2008


Nick Barnes <Nick.Barnes at pobox.com> added the comment:

# Note, this test covers issues 4425 and 4426

# Direct encoded characters:
set_d =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'(),-./:?"

# Optional direct characters:
set_o = '!"#$%&*;<=>@[]^_`{|}'

all((c.encode('utf7') == c) for c in set_d)
all((c.decode('utf7') == c) for c in set_d)
all((c.decode('utf7') == c) for c in set_o)

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4426>
_______________________________________


More information about the Python-bugs-list mailing list