View Single Post
Old 11-30-2014, 10:45 AM   #18
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by arspr View Post
And yet another brainstorming about making non-printable characters visible: through named entities.
  • Calibre does prefer the usage of unicode characters over named entities. But this case could be the exception to that general rule.
  • I propose something like a "white-list" of named entities/"black-list" of their associated unicode characters. (Also fully customizable?)
  • Then some options which could cause:
    • Nothing. As Calibre currently beheaves. The default option.
    • Warn me. Whenever a new editor window is opened an automatic search is launched against the black-list. And you get a warning. But nothing else is done.
    • Automatically change when opening but revert on save. The black-listed unicode chars are automatically changed by entities. This procedure is reverted when saving. I mean that the epub/azw3 file on the HDD always contains unicode chars but the opened editor shows entities.
    • Preserve entities. The same as above but entities are preserved when saving.
Of course this scheme needs some polishing and those white-listed entities would also affect other areas of the code, like the main named entities check or the automated change into Unicode when typing the ending ";" ... But I think the general idea is more or less clear.

As I said just brainstorming mode.
Sounds like an idea for an editor plugin.
eschwartz is offline   Reply With Quote