[issue19279] UTF-7 to UTF-8 decoding crash

2013-10-17 Thread Guillaume Lebourgeois
Guillaume Lebourgeois added the comment: "Also, the usual way to decode by using the .decode method." The original bug happened using requests library, so I have no leverage on the used method for decoding. But if you used the "replace" mode with your methodology, you wo

[issue19279] UTF-7 to UTF-8 decoding crash

2013-10-17 Thread Guillaume Lebourgeois
Guillaume Lebourgeois added the comment: My fault, bad paste. Should have written : >>> content = b'+1911\' rel=\'stylesheet\' type=\'text/css\' />\n>> rel="alternate" type="application/rss+xml' >>> codecs.utf

[issue19279] UTF-7 to UTF-8 decoding crash

2013-10-17 Thread Guillaume Lebourgeois
New submission from Guillaume Lebourgeois: After the fetch of a webpage with a wrongly declared encoding, the use of codecs module for a conversion crashes. The issue is reproducible this way : >>> content = b"+1911\' rel=\'stylesheet\' type=\'text