diff --git a/src/calibre/devices/eb600/driver.py b/src/calibre/devices/eb600/driver.py index 4cf9ee5cf9..04501d193a 100644 --- a/src/calibre/devices/eb600/driver.py +++ b/src/calibre/devices/eb600/driver.py @@ -101,7 +101,7 @@ class POCKETBOOK360(EB600): VENDOR_NAME = ['PHILIPS', '__POCKET', 'POCKETBO'] WINDOWS_MAIN_MEM = WINDOWS_CARD_A_MEM = ['MASS_STORGE', 'BOOK_USB_STORAGE', - 'OK_POCKET_611_61'] + 'OK_POCKET_611_61', 'OK_POCKET_360+61'] OSX_MAIN_MEM = OSX_CARD_A_MEM = 'Philips Mass Storge Media' OSX_MAIN_MEM_VOL_PAT = re.compile(r'/Pocket') diff --git a/src/calibre/ebooks/mobi/writer2/serializer.py b/src/calibre/ebooks/mobi/writer2/serializer.py index 1e8a204ad5..2b38c1e6a6 100644 --- a/src/calibre/ebooks/mobi/writer2/serializer.py +++ b/src/calibre/ebooks/mobi/writer2/serializer.py @@ -7,11 +7,10 @@ __license__ = 'GPL v3' __copyright__ = '2011, Kovid Goyal ' __docformat__ = 'restructuredtext en' -import re +import re, unicodedata from calibre.ebooks.oeb.base import (OEB_DOCS, XHTML, XHTML_NS, XML_NS, namespace, prefixname, urlnormalize) -from calibre.ebooks import normalize from calibre.ebooks.mobi.mobiml import MBP_NS from calibre.ebooks.mobi.utils import is_guide_ref_start @@ -356,7 +355,9 @@ class Serializer(object): text = text.replace(u'\u00AD', '') # Soft-hyphen if quot: text = text.replace('"', '"') - self.buf.write(normalize(text).encode('utf-8')) + if isinstance(text, unicode): + text = unicodedata.normalize('NFC', text) + self.buf.write(text.encode('utf-8')) def fixup_links(self): ''' diff --git a/src/calibre/library/server/opds.py b/src/calibre/library/server/opds.py index 465439751c..b86d0e7a2d 100644 --- a/src/calibre/library/server/opds.py +++ b/src/calibre/library/server/opds.py @@ -561,7 +561,9 @@ class OPDSServer(object): if type_ != 'I': raise cherrypy.HTTPError(404, 'Non id categories not supported') - ids = self.db.get_books_for_category(category, which) + q = category + if q == 'news': q = 'tags' + ids = self.db.get_books_for_category(q, which) sort_by = 'series' if category == 'series' else 'title' return self.get_opds_acquisition_feed(ids, offset, page_url,