View Single Post
Old 08-06-2017, 10:02 AM   #1
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,625
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Representing the no-break space

Hi

Here are the different ways to write it. We are living in a complex and threatening world...

http://www.fileformat.info/info/unic...00a0/index.htm

No-break spaces are particularly required for French users, which explains why this subject is so sensitive to us. A French book, written following the typographic rules of the Imprimerie Nationale, may contain thousands of no-break spaces (not to speak about narrow no-break spaces). I am not joking.

As everybody knows, the use of
Code:
 
has been deprecated for EPUB3. I remember the glorious times when this obnoxious named entity wreaked havoc among Sigil files. This is behind us now and this is just where the fun begins. For ebook users, the situation looks about the same than the one for European users, some of them, well most, using the metric system, some others the Imperial system. So, to make it short, for the same purpose in its code :
- The Calibre editor uses the Unicode character
Code:
\u00a0
- Sigil uses the decimal html entity*
Code:
& #160;
Using different signs for the same purpose can induce some disagreements. That's why, when you switch from one Editor to another because they are complementary, you need to adapt to this difference.

When, coming from the Calibre editor, I open an EPUB with Sigil, my
Code:
\u00a0
are automatically changed to
Code:
& #160;
and I make use of a plain regex when I come back to the Calibre editor to reestablish the previous situation. This regex is a little alike a genuflection or a sign of the cross. You do it without thinking too much about it. This is mine:
Code:
 |& #160;
Code:
\u00a0
But this situation is really puzzling (unpleasant) for beginners.I do not say that someone is right, and the other is wrong. Both editors are right in their own way, but I can't help thinking that offering a common choice would be nice. Even if the two signs are rendered the same way, are recognized everywhere, I have a preference for the Unicode one, if only for cosmetic reasons.

I know this is nearly an article of faith and I do not wish to open a religious war but maybe there is room for compromise, for a peaceful co-existence. Would it be possible to open a small place in Preferences where the user could choose its own representation of the No-break space? Sigil would follow on using by default its smart decimal html entity
Code:
& #160;
but the users would be offered the possibility to customize it and make it display another choice.

Nota*: on this forum, I wrote the 160 with a plain space after the ampersand to make it appear.

Last edited by roger64; 08-06-2017 at 11:45 AM.
roger64 is offline   Reply With Quote