Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 04-08-2025, 09:34 AM   #1
BlackWinny
Enthusiast
BlackWinny began at the beginning.
 
BlackWinny's Avatar
 
Posts: 30
Karma: 10
Join Date: Jul 2012
Location: France
Device: Win11 Acer 17" laptop + Win11 Yonis 10" Tablet
 

Hum... it's a bit of a shame that   is replaced by a common space when in the description editor I get back from the HTML source tab to the Normal view tab.



In France for example, many punctuations need to be preceded by an unbreakable space.An unbreakable space is also very often used as thousands separator where English writers use a comma. The two quotation marks « and » do also need an unbreakable space when we want to write correctly.


These three situations are for example extremely useful when the lines are very short in the GUI to show the text as it it for the description of a book at the rightmost region of the Calibre GUI.


There are also other situations where the unbreakable space is very useful.


Writers should be free to use them or not.


Please Kovid, could you fix that very annoying filter ?



Jacques
BlackWinny is offline   Reply With Quote
Old 04-08-2025, 11:29 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,349
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
They are not replaced by an ordinary space, they are replaced the unicode character for a non-breaking space. Although IIRC copying from that control will convert nbsp character to spaces because of a bug in Qt
kovidgoyal is online now   Reply With Quote
Advert
Old 04-08-2025, 04:59 PM   #3
BlackWinny
Enthusiast
BlackWinny began at the beginning.
 
BlackWinny's Avatar
 
Posts: 30
Karma: 10
Join Date: Jul 2012
Location: France
Device: Win11 Acer 17" laptop + Win11 Yonis 10" Tablet
Thanks Kovid. That's really weird, because I can't see any change in the hexa code after having inserted an nbsp; in replacement of a common space.

Without wanting to take too much of your time, let's see a short example:

1.
In the "Normal viewer" tab I have a French sentence like this:
La langue française nous tend des pièges au quotidien !

Dragging the left limit of the text container which is in the rightmost side of the main GUI I can see the exclamation mark going alone to the next line. I would like to "group" the last word of the sentence with the exclamation mark.

2.
To see the code before any alteration, in the "Normal Viewer" tab I do a copy of the sentence, then I simply paste it in Notepad++ in hexa mode (there is a plugin available for that). In hexa it gives this:
4c 61 20 6c 61 6e 67 75 65 20 66 72 61 6e c3 a7 61 69 73 65 20 6e 6f 75 73 20 74 65 6e 64 20 64 65 73 20 70 69 c3 a8 67 65 73 20 61 75 20 71 75 6f 74 69 64 69 65 6e 20 21

Correct.
(the most important is the penultimate character)

3.
I come back to Calibre "HTML Source" tab, and in replacement of the last space I put   to have now an unbreakable space.

4.
Then I come back to the "Normal Viewer" tab, and I copy again all the sentence.

5.
In a new tab of Notepad++ again in Hexa mode, I paste again. And... I don't see any difference!:
4c 61 20 6c 61 6e 67 75 65 20 66 72 61 6e c3 a7 61 69 73 65 20 6e 6f 75 73 20 74 65 6e 64 20 64 65 73 20 70 69 c3 a8 67 65 73 20 61 75 20 71 75 6f 74 69 64 69 65 6e 20 21

... while I should have:
4c 61 20 6c 61 6e 67 75 65 20 66 72 61 6e c3 a7 61 69 73 65 20 6e 6f 75 73 20 74 65 6e 64 20 64 65 73 20 70 69 c3 a8 67 65 73 20 61 75 20 71 75 6f 74 69 64 69 65 6e a0 21

No?

6
And yet... I see that the change has an effective result!!! This time it is not only the exclamation mark which goes to the next line... but also the last word as I desired.

Of course I'm happy of the result, but there's a mystery for me.



Last edited by BlackWinny; 04-08-2025 at 05:31 PM.
BlackWinny is offline   Reply With Quote
Old 04-08-2025, 10:20 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,349
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Although IIRC copying from that control will convert nbsp character to spaces because of a bug in Qt
kovidgoyal is online now   Reply With Quote
Old 04-09-2025, 12:27 AM   #5
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,611
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Quote:
Originally Posted by BlackWinny View Post
Hum... it's a bit of a shame that   is replaced by a common space when in the description editor I get back from the HTML source tab to the Normal view tab.
You're talking about the Edit Metadata screen, right?
I can confirm your findings. Type or paste a no break space in the comments field, and it gets converted to a normal space after flicking between screens.
Karellen is offline   Reply With Quote
Advert
Old 04-09-2025, 07:56 AM   #6
BlackWinny
Enthusiast
BlackWinny began at the beginning.
 
BlackWinny's Avatar
 
Posts: 30
Karma: 10
Join Date: Jul 2012
Location: France
Device: Win11 Acer 17" laptop + Win11 Yonis 10" Tablet
Quote:
Originally Posted by kovidgoyal View Post
Although IIRC copying from that control will convert nbsp character to spaces because of a bug in Qt
Hello Kovid,


Ah Ok. Didn't pay enough attention to this part of your previous reply, sorry.


Just a small last question : what is Qt?
BlackWinny is offline   Reply With Quote
Old 04-09-2025, 08:04 AM   #7
BlackWinny
Enthusiast
BlackWinny began at the beginning.
 
BlackWinny's Avatar
 
Posts: 30
Karma: 10
Join Date: Jul 2012
Location: France
Device: Win11 Acer 17" laptop + Win11 Yonis 10" Tablet
Hello Karellen,
Quote:
Originally Posted by Karellen View Post
You're talking about the Edit Metadata screen, right?
I can confirm your findings. Type or paste a no break space in the comments field, and it gets converted to a normal space after flicking between screens.
Yes, right.

And yet the result is the one expected when back to the main GUI. So the explanation given by Kovid, a bug from an external tool or library (only in the displaying of the source code?) is certainly the good one.
BlackWinny is offline   Reply With Quote
Old 04-09-2025, 02:05 PM   #8
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,190
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by BlackWinny View Post
Just a small last question : what is Qt?
Qt is a multiOS tool that allows easier authoring of software that will run on Linux, MacOS, Windows, embedded systems, etc. In practice, it does not work quite as well as the puffery promises but it does work fairly well and a lot easier than writing graphics libraries, tools, etc. for multiple OS.
DNSB is offline   Reply With Quote
Old 04-09-2025, 04:30 PM   #9
BlackWinny
Enthusiast
BlackWinny began at the beginning.
 
BlackWinny's Avatar
 
Posts: 30
Karma: 10
Join Date: Jul 2012
Location: France
Device: Win11 Acer 17" laptop + Win11 Yonis 10" Tablet
Thank you, DNSB !
BlackWinny is offline   Reply With Quote
Reply

Tags
unbreakable space


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Copied and pasted   ended up with & #160; Gregg Bell Sigil 13 06-29-2020 11:44 PM
&()nbsp , &()#160 , inconsistencies?? rbruce1314 Sigil 47 09-18-2015 12:29 PM
iBooks does NOT LIKE   Erin Apple Devices 0 09-13-2011 11:17 AM


All times are GMT -4. The time now is 12:03 PM.


MobileRead.com is a privately owned, operated and funded community.