# HG changeset patch # User Christopher Rogers # Date 1295300596 0 # Node ID e7e20f7f283a9feaf7a230cbecc41a624fef5f53 # Parent 8ee7c7081850bc2c4cfaff65b30c2d81fb388e22 Add patch to feedparser for utf8 decoding. diff -r 8ee7c7081850 -r e7e20f7f283a feedparser/receipt --- a/feedparser/receipt Mon Jan 17 21:22:17 2011 +0000 +++ b/feedparser/receipt Mon Jan 17 21:43:16 2011 +0000 @@ -14,8 +14,8 @@ # Rules to configure and make the package. compile_rules() { - cd $src + patch -Np0 -i ../stuff/feedparser_uft8_decoding.patch python setup.py build python setup.py install --root=$PWD/$PACKAGE-$VERSION/_pkg diff -r 8ee7c7081850 -r e7e20f7f283a feedparser/stuff/feedparser_utf8_decoding.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/feedparser/stuff/feedparser_utf8_decoding.patch Mon Jan 17 21:43:16 2011 +0000 @@ -0,0 +1,11 @@ +--- /var/lib/python-support/python2.5/feedparser.py 2008-01-23 20:10:27.000000000 +0100 ++++ feedparser.py 2008-07-28 11:01:38.000000000 +0200 +@@ -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: