From b6c9d08945ed401e74f450ca7e4d267e74e176b1 Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Dec 27 2008 18:43:10 +0000 Subject: Add patch for a utf8 decoding issue (#477024) --- diff --git a/feedparser_utf8_decoding.patch b/feedparser_utf8_decoding.patch new file mode 100644 index 0000000..44111b9 --- /dev/null +++ b/feedparser_utf8_decoding.patch @@ -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: diff --git a/python-feedparser.spec b/python-feedparser.spec index ddae89e..f7b5dc0 100644 --- a/python-feedparser.spec +++ b/python-feedparser.spec @@ -9,6 +9,7 @@ Group: Development/Languages License: BSD URL: http://feedparser.org/ Source0: http://download.sourceforge.net/feedparser/feedparser-%{version}.zip +Patch0: feedparser_utf8_decoding.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -24,6 +25,7 @@ modules, including Dublin Core and Apple's iTunes extensions. %prep %setup -q -c +%patch0 -p0 -b .utf8_decoding find -type f -exec sed -i 's/\r//' {} ';' find -type f -exec chmod 0644 {} ';' @@ -50,8 +52,8 @@ rm -rf $RPM_BUILD_ROOT %changelog -* Sat Nov 29 2008 Ignacio Vazquez-Abrams - 4.1-5 -- Rebuild for Python 2.6 +* Sat Dec 27 2008 Konstantin Ryabitsev - 4.1-5 +- Patch for a utf8 decoding issue (#477024) * Wed Sep 3 2008 Tom "spot" Callaway - 4.1-4 - fix license tag