Serhiy Storchaka added the comment: Aha! It looks as a bug in UTF-7 codec. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue20520> _______________________________________