From 403865c914aad5a93e7b2bc32b418ce82cf8d6f6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 24 Aug 2013 11:22:59 +0530 Subject: [PATCH] Replace instead of ignoring --- src/calibre/db/tables.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/db/tables.py b/src/calibre/db/tables.py index 6d578e788c..57ca395f4c 100644 --- a/src/calibre/db/tables.py +++ b/src/calibre/db/tables.py @@ -99,7 +99,7 @@ class OneToOneTable(Table): # failures to decode utf-8 query = db.conn.execute('SELECT {0}, cast({1} as blob) FROM {2}'.format(idcol, self.metadata['column'], self.metadata['table'])) - self.book_col_map = {k:bytes(val).decode('utf-8', 'ignore') for k, val in query} + self.book_col_map = {k:bytes(val).decode('utf-8', 'replace') for k, val in query} else: us = self.unserialize self.book_col_map = {book_id:us(val) for book_id, val in query}