[Python-modules-commits] r6589 - in packages/feedparser/trunk/debian/patches (1 file)

cgalisteo-guest at users.alioth.debian.org cgalisteo-guest at users.alioth.debian.org
Thu Sep 25 10:57:31 UTC 2008


    Date: Thursday, September 25, 2008 @ 10:57:29
  Author: cgalisteo-guest
Revision: 6589

Oops, forgot the patch file.

Added:
  packages/feedparser/trunk/debian/patches/feedparser_utf8_decoding.patch

Added: packages/feedparser/trunk/debian/patches/feedparser_utf8_decoding.patch
===================================================================
--- packages/feedparser/trunk/debian/patches/feedparser_utf8_decoding.patch	                        (rev 0)
+++ packages/feedparser/trunk/debian/patches/feedparser_utf8_decoding.patch	2008-09-25 10:57:29 UTC (rev 6589)
@@ -0,0 +1,11 @@
+--- trunk.orig/feedparser.py
++++ trunk/feedparser.py
+@@ -1455,7 +1455,7 @@
+         # thanks to Kevin Marks for this breathtaking hack to deal with (valid) high-bit attribute values in UTF-8 feeds
+         for key, value in attrs:
+             if type(value) != type(u''):
+-                value = unicode(value, self.encoding)
++                value = unicode(value, self.encoding, errors='replace')
+             uattrs.append((unicode(key, self.encoding), value))
+         strattrs = u''.join([u' %s="%s"' % (key, value) for key, value in uattrs]).encode(self.encoding)
+         if tag in self.elements_no_end_tag:




More information about the Python-modules-commits mailing list