Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 01-25-2012, 05:19 AM   #1
Olger
Member
Olger began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Nov 2011
Device: Kobo Touch
replacing html character

Hi All,

I've tried pretty much all I can, but I'm just not used to python, prefer php actually. Anyway, I'm encountering some html characters that are not displayed correctly on my ereader.
So I've tried to use:
preprocess_regexps = [
(re.compile(r"—", re.IGNORECASE | re.DOTALL), lambda match: "--"),
]

to replace the — with -- (or any other character). Ain't working. The html character is removed, but not replaced.
I haven't been able to find much doco on how to use the compile function either.
Anybody able to help out?
Cheers! Olger
Olger is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Replacing code without replacing text? ElMiko Sigil 6 11-30-2011 08:14 PM
Epub format, B & N PubIt!, and HTML character entities jlandahl ePub 3 04-07-2011 04:38 AM
Calibre Recipe HTML content differs from raw html of index.html. krunk Calibre 4 09-20-2010 09:48 PM
Access to local HTML files and content, HTML ebooks, annotation on HTML ebooks leo315 enTourage Archive 2 05-10-2010 02:40 PM
Replacing ¬ PieOPah Workshop 5 12-17-2008 04:25 PM


All times are GMT -4. The time now is 06:31 PM.


MobileRead.com is a privately owned, operated and funded community.