View Single Post
Old 12-05-2008, 10:34 AM   #1
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
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'Ð')]
This should replace Đ (Latin Capital Letter D With stroke - U+0110) with Ð (Latin Capital Letter Eth - U+00D0)

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,
kiklop74 is offline   Reply With Quote