wok-4.x rev 7993

Add patch to feedparser for utf8 decoding.
author Christopher Rogers <slaxemulator@gmail.com>
date Mon Jan 17 21:43:16 2011 +0000 (2011-01-17)
parents 8ee7c7081850
children 95b9a6a1b091
files feedparser/receipt feedparser/stuff/feedparser_utf8_decoding.patch
line diff
     1.1 --- a/feedparser/receipt	Mon Jan 17 21:22:17 2011 +0000
     1.2 +++ b/feedparser/receipt	Mon Jan 17 21:43:16 2011 +0000
     1.3 @@ -14,8 +14,8 @@
     1.4  # Rules to configure and make the package.
     1.5  compile_rules()
     1.6  {
     1.7 -	
     1.8  	cd $src
     1.9 +	patch -Np0 -i ../stuff/feedparser_uft8_decoding.patch
    1.10  	python setup.py build
    1.11      python setup.py install --root=$PWD/$PACKAGE-$VERSION/_pkg	
    1.12  
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/feedparser/stuff/feedparser_utf8_decoding.patch	Mon Jan 17 21:43:16 2011 +0000
     2.3 @@ -0,0 +1,11 @@
     2.4 +--- /var/lib/python-support/python2.5/feedparser.py	2008-01-23 20:10:27.000000000 +0100
     2.5 ++++ feedparser.py	2008-07-28 11:01:38.000000000 +0200
     2.6 +@@ -1455,7 +1455,7 @@
     2.7 +         # thanks to Kevin Marks for this breathtaking hack to deal with (valid) high-bit attribute values in UTF-8 feeds
     2.8 +         for key, value in attrs:
     2.9 +             if type(value) != type(u''):
    2.10 +-                value = unicode(value, self.encoding)
    2.11 ++                value = unicode(value, self.encoding, errors='replace')
    2.12 +             uattrs.append((unicode(key, self.encoding), value))
    2.13 +         strattrs = u''.join([u' %s="%s"' % (key, value) for key, value in uattrs]).encode(self.encoding)
    2.14 +         if tag in self.elements_no_end_tag: