From c25f34930caae0384caebc6ee1cee3013225f6d2 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Fri, 6 Jan 2017 13:53:18 -0600 Subject: [PATCH] Final extended char fix for adapter_wwwlushstoriescom--hopefully. --- fanficfare/adapters/adapter_wwwlushstoriescom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fanficfare/adapters/adapter_wwwlushstoriescom.py b/fanficfare/adapters/adapter_wwwlushstoriescom.py index 11811efb..3cc23340 100644 --- a/fanficfare/adapters/adapter_wwwlushstoriescom.py +++ b/fanficfare/adapters/adapter_wwwlushstoriescom.py @@ -63,10 +63,10 @@ class WWWLushStoriesComAdapter(BaseSiteAdapter): # XXX try: storyId = urllib2.quote(storyId) except KeyError: - ## string from calibre on windows *isn't* utf8, but a - ## latin1 of some kind. This encode would be better - ## done somewhere where the code type can be known. - storyId = urllib2.quote(storyId.encode("Windows-1252")) + ## string from calibre is utf8, but lushstories.com + ## expects extended chars to be in latin1 / iso-8859-1 + ## rather than utf8. + storyId = urllib2.quote(storyId.encode("iso-8859-1")) self.story.setMetadata('storyId',storyId)