12-05-2008, 10:34 AM | #1 |
Guru
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
|
Help with writing recipe
I need to replace some character with another one wherever it shows in the downloaded html page but I'm unable to figure out how to do that using preprocess_regexps.
My idea was something like this: Code:
preprocess_regexps = [(re.compile(r'Đ'), lambda match: r'Ð')] but it does not work since python complains to the presence of unicode letters in script. I need this since fonts shipped with PRS-505 do not have first character defined (shows up as empty square) while the other is present and they look the same so it would be adequate replacement for better reading. Thanks, |
12-05-2008, 01:48 PM | #2 |
creator of calibre
Posts: 44,384
Karma: 23766374
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Use u'\u0110' (its the unicode representation of the character)
|
Advert | |
|
12-05-2008, 01:54 PM | #3 |
Guru
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
What are you currently writing? | Dr. Drib | Writers' Corner | 948 | 09-13-2012 12:12 AM |
Writing with an accent, how do you do it? | basilsands | Writers' Corner | 19 | 10-03-2010 05:32 AM |
Writing Notes | MikeKing | Sony Reader | 33 | 05-29-2009 03:23 PM |
Problems writing recipe | kiklop74 | Calibre | 9 | 10-28-2008 06:58 PM |
Writing to the SD card? | Krytes | HanLin eBook | 3 | 07-20-2008 08:00 AM |