wok diff feedparser/stuff/feedparser_utf8_decoding.patch @ rev 11905

Up: slitaz-tools (4.6) - New wifibox, installer and small fixes
author Christophe Lincoln <pankso@slitaz.org>
date Wed Feb 29 20:36:46 2012 +0100 (2012-02-29)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/feedparser/stuff/feedparser_utf8_decoding.patch	Wed Feb 29 20:36:46 2012 +0100
     1.3 @@ -0,0 +1,11 @@
     1.4 +--- /var/lib/python-support/python2.5/feedparser.py	2008-01-23 20:10:27.000000000 +0100
     1.5 ++++ feedparser.py	2008-07-28 11:01:38.000000000 +0200
     1.6 +@@ -1455,7 +1455,7 @@
     1.7 +         # thanks to Kevin Marks for this breathtaking hack to deal with (valid) high-bit attribute values in UTF-8 feeds
     1.8 +         for key, value in attrs:
     1.9 +             if type(value) != type(u''):
    1.10 +-                value = unicode(value, self.encoding)
    1.11 ++                value = unicode(value, self.encoding, errors='replace')
    1.12 +             uattrs.append((unicode(key, self.encoding), value))
    1.13 +         strattrs = u''.join([u' %s="%s"' % (key, value) for key, value in uattrs]).encode(self.encoding)
    1.14 +         if tag in self.elements_no_end_tag: