From 3c5d1b69c5c5c2c090dc5018633abe6d6dacd0fa Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 21 Mar 2009 11:56:43 -0700 Subject: [PATCH] PDF Input: Replace non-breaking spaces with normal spaces. Fixes #2104 (epub justification problems with converted pdf) --- src/calibre/ebooks/html.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/html.py b/src/calibre/ebooks/html.py index 28bfd1067d..f405040c77 100644 --- a/src/calibre/ebooks/html.py +++ b/src/calibre/ebooks/html.py @@ -355,7 +355,10 @@ class PreProcessor(object): (re.compile(r'-\n\r?'), lambda match: ''), # Remove gray background - (re.compile(r']+>'), lambda match : '') + (re.compile(r']+>'), lambda match : ''), + + # Remove non breaking spaces + (re.compile(ur'\u00a0'), lambda match : ' '), ]