This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mrabarnett
Recipients ezio.melotti, glebourgeois, mrabarnett, serhiy.storchaka, vstinner
Date 2013-10-17.14:54:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1382021642.34.0.12937711156.issue19279@psf.upfronthosting.co.za>
In-reply-to
Content
The bytestring literal isn't valid. It starts with b" and later on has an unescaped " followed by more characters.

Also, the usual way to decode by using the .decode method.

I get this:

>>> content = b"+1911\' rel=\'stylesheet\' type=\'text/css\' />\n<link rel=\"alternate\" type=\"application/rss+xml\""
>>> content.decode("utf-7", "strict")
Traceback (most recent call last):
  File "<pyshell#10>", line 1, in <module>
    content.decode("utf-7", "strict")
  File "C:\Python33\lib\encodings\utf_7.py", line 12, in decode
    return codecs.utf_7_decode(input, errors, True)
UnicodeDecodeError: 'utf7' codec can't decode bytes in position 0-5: partial character in shift sequence
History
Date User Action Args
2013-10-17 14:54:02mrabarnettsetrecipients: + mrabarnett, vstinner, ezio.melotti, serhiy.storchaka, glebourgeois
2013-10-17 14:54:02mrabarnettsetmessageid: <1382021642.34.0.12937711156.issue19279@psf.upfronthosting.co.za>
2013-10-17 14:54:02mrabarnettlinkissue19279 messages
2013-10-17 14:54:01mrabarnettcreate