View Single Post
Old 11-30-2014, 02:58 AM   #15
arspr
Dead account. Bye
arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.
 
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
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.

Last edited by arspr; 11-30-2014 at 03:06 AM.
arspr is offline   Reply With Quote