wok annotate feedparser/stuff/feedparser_utf8_decoding.patch @ rev 19838

syslinux/iso2exe: fix hybrid mbr read
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Mar 12 09:47:07 2017 +0100 (2017-03-12)
parents
children
rev   line source
slaxemulator@7993 1 --- /var/lib/python-support/python2.5/feedparser.py 2008-01-23 20:10:27.000000000 +0100
slaxemulator@7993 2 +++ feedparser.py 2008-07-28 11:01:38.000000000 +0200
slaxemulator@7993 3 @@ -1455,7 +1455,7 @@
slaxemulator@7993 4 # thanks to Kevin Marks for this breathtaking hack to deal with (valid) high-bit attribute values in UTF-8 feeds
slaxemulator@7993 5 for key, value in attrs:
slaxemulator@7993 6 if type(value) != type(u''):
slaxemulator@7993 7 - value = unicode(value, self.encoding)
slaxemulator@7993 8 + value = unicode(value, self.encoding, errors='replace')
slaxemulator@7993 9 uattrs.append((unicode(key, self.encoding), value))
slaxemulator@7993 10 strattrs = u''.join([u' %s="%s"' % (key, value) for key, value in uattrs]).encode(self.encoding)
slaxemulator@7993 11 if tag in self.elements_no_end_tag: