Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Proper handling of non-ascii titles

  • Loading branch information...
commit ac480d4b1abfc831800321f62b2851945a362e2c 1 parent e6f06fb
Amit Chakradeo authored
2  planet/reconstitute.py
View
@@ -75,7 +75,7 @@ def id(xentry, entry):
entry_id = entry.link
elif entry.has_key("title") and entry.title:
entry_id = (entry.title_detail.base + "/" +
- md5(entry.title).hexdigest())
+ md5(entry.title.encode('utf-8')).hexdigest())
elif entry.has_key("summary") and entry.summary:
entry_id = (entry.summary_detail.base + "/" +
md5(entry.summary).hexdigest())
10 tests/data/reconstitute/title_nonascii.xml
View
@@ -0,0 +1,10 @@
+<!--
+Description: title value
+Expect: title_detail.language == 'en-us'
+-->
+
+<feed xmns="http://www.w3.org/2005/Atom">
+ <entry>
+ <title xml:lang="en-us">foo æøå. French: êèé </title>
+ </entry>
+</feed>
Please sign in to comment.
Something went wrong with that request. Please try again.