From 96bc19e65243ec4696df3e85d8ad054ff3211d4c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 11 Feb 2015 12:41:22 +0530 Subject: [PATCH] Amazon metadata download: Update plugin for website changes to Amazon Brazil. Fixes #1420629 [Amazon.br metadata source, error with accents](https://bugs.launchpad.net/calibre/+bug/1420629) --- src/calibre/ebooks/metadata/sources/amazon.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/ebooks/metadata/sources/amazon.py b/src/calibre/ebooks/metadata/sources/amazon.py index 6646d8c59c..2d9870e745 100644 --- a/src/calibre/ebooks/metadata/sources/amazon.py +++ b/src/calibre/ebooks/metadata/sources/amazon.py @@ -240,6 +240,8 @@ class Worker(Thread): # Get details {{{ return oraw = raw + if 'amazon.com.br' in self.url: + raw = raw.decode('utf-8') # amazon.com.br serves utf-8 but has an incorrect latin1 tag raw = xml_to_unicode(raw, strip_encoding_pats=True, resolve_entities=True)[0] if '404 - ' in raw: