|
|
#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, |
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,626
Karma: 28549046
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Use u'\u0110' (its the unicode representation of the character)
|
|
|
|
| Advert | |
|
|
|
|
#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 01:12 AM |
| Writing with an accent, how do you do it? | basilsands | Writers' Corner | 19 | 10-03-2010 06:32 AM |
| Writing Notes | MikeKing | Sony Reader | 33 | 05-29-2009 04:23 PM |
| Problems writing recipe | kiklop74 | Calibre | 9 | 10-28-2008 07:58 PM |
| Writing to the SD card? | Krytes | HanLin eBook | 3 | 07-20-2008 09:00 AM |