View Single Post
Old 10-17-2009, 08:48 AM   #2
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,557
Karma: 93980341
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by crutledge View Post
I have been running into a series of PG books encoded in charset=iso-8859-1. The emdash is encoded as #8212 followed by a soft hyphen #173. I go into the PG file in the editor and replace these with #151.

I would like to add this to the Book Cleaner. The emdash seems to be handled by 2.bcf showing:
find what: uni(137)
replace with: uni(151)

I must be mis-interpreting something because I cannot reference uni(137) with the endash.

Would someone point me in the right direction?

Charlie
You need to look at "1.bcf" (which runs as the file is loaded) and "2.bcf" (which runs after BD has done all its initial default processing to the file) as a pair, Charlie.

By default, BD converts dashes into hyphens, so this is a "workaround" to stop it from doing so. If you look at "1", you'll see that it replaces #151 with #137, and then "2" replaces #137 with #151 again. The affect of this is to make BD "preserve" dashes.

What you need to do is to edit "1.bcf" and tell it to replace your character sequence with #137.
HarryT is offline   Reply With Quote