![]() |
#241 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,378
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
It's the same one, if you want to see the changes, you have to run from source.
|
![]() |
![]() |
#242 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
The non-breaking space problem
@kovid,
Please can I ask you have another look at the nbsp issue of unicode \xA0 vs. the   entity as raised by Perkin. I am using calibre v1.14, not running from source, so if the following is no longer relevant please ignore ![]() The attached epub contains 14 unicode \xA0 chars. When viewed in calibre Viewer all is OK.
This is a similar problem to one which existed in Sigil for a very long time, although it is fixed in the current version. A possible way to avoid both Problem 1 & 2 above may be to convert the unicode \xA0 chars to entities (  or & # 160) during Tweak's File-Open and convert them back to unicode during the File-Save. I think current Sigil does the former (and complains about 'not well formed' because DTD is missing) but not the latter. I've done a brief test of the theory by manually converting the \xA0 chars to   before opening in Tweak. After an edit/save Tweak has converted the   to \xA0 and the edited epub displays correctly. Obviously I have no idea of any wider ramifications to Tweak of   entities being temporarily present during the editing process, but given the high percentage of retail epubs which use 'empty   paragraphs' to create scenebreaks etc, IMHO something needs to be done to avoid the current 'silent stripping'. If I've missed something obvious which would have avoided these problems, feel free to call me an idiot ![]() Last edited by jackie_w; 12-08-2013 at 08:30 AM. |
![]() |
![]() |
#243 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 657
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
Another related nbsp problem...
I tried to do a S&R by copying the nbsp character into the find box, but the find doesn't find them, just cycles through the normal space chars. How would I enter the character to do the S&R. Edit: seeing jackie_w's post, I used the '\xA0' in the search box and it now finds the character. The 'Replace All' doesn't find any occurences, but the find/replace&find does (OS X Mavericks) Last edited by Perkin; 12-08-2013 at 08:46 AM. |
![]() |
![]() |
#244 | |
Bookish
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,018
Karma: 2003162
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, Nxtpaper 11
|
Quote:
Code:
<p> <p> I used to convert them to   or & # 160 as jackie_w indicated, but that is now not valid anymore. Last edited by DrChiper; 12-08-2013 at 10:15 AM. |
|
![]() |
![]() |
#245 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,378
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@jackie_w: You are correct, Qt's toPlainText() function replaces \xa0 with a normal space, causing the non breaking spaces to be stripped out during save. I have fixed that by replacing toPlainText() with my own implementation. https://github.com/kovidgoyal/calibr...78c463c5b4c956
|
![]() |
![]() |
#246 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,378
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@Perkin: Your nbsp search issues are not search issues but problems caused by the same Qt bug that causes copying of nbsp characters to not work (they are replaced by spaces).
|
![]() |
![]() |
#247 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
Quote:
Last edited by jackie_w; 12-08-2013 at 02:17 PM. |
|
![]() |
![]() |
#248 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
|
To be sure the problem below was not caused by a problem in the calibre install, I've replaced it with a clean one (except for the settings directory). The problem still exists.
I know you've removed the ampersands, but I thought I'd post the information anyway in cause you'd want to look into this later. The Windows-installation is a completely up to date Windows 7 x64 Professional. I haven't got anyting installed like a separate QT (only QT as part of applications, such as Sigil, and Frescobaldi), and I don't have any old Delphi-programs or runtimes installed, as was suggested some posts ago. (At least, I don't have those, as far as I know.) Quote:
|
|
![]() |
![]() |
#249 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
I just updated my source and tried. Everything seems to be working: The characters are there, they survive a save and reopen, the preview pane shows them correctly and works correctly when I resized the pane.
|
![]() |
![]() |
#250 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
Quote:
![]() |
|
![]() |
![]() |
#251 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 657
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
|
![]() |
![]() |
#252 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,378
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@Katsunami: These kinds of problems are deep in Qt code and that makes debugging them a real pain. For something as trivial as this, it isn't wortht he effort. Off the top of my head, the onlything I can think of is that are you using the calibre style or the system default widget style? Preferences->Look & Feel in calibre.
|
![]() |
![]() |
#253 |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,897
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
FYI. I just switched to System Default and I saw the & symbols as described. Switched back to Calibre Style and they were gone.
|
![]() |
![]() |
#254 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,378
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Just uploaded some new betas to http://download.calibre-ebook.com/betas/
They include a new Book Check tool that finds well-formedness errors in XML/XHTML, invalid images, images in CMYK colorspaces and broken links. More checks will be added later. Also fixed the bugs reported by arspr for css syntax highlighting and jackie_w for nbsp handling. Finally, links in the preview panel are now clickable. |
![]() |
![]() |
#255 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
|
Hi Kovid,
I found two little errors (maybe you have already fixed them): If I undock a window from the editor GUI (a nice feature in the editor), it works fine except for the inspector, what shows an empty window. If I dock it back to its place in the GUI, all code is shown again but loses the actual position and start have the position at top of the file If there are blank lines in a text (with or without a blank character), they will not be shown in the file preview window. When I replace the blank with ‘ ’ the blank line will be shown Edit: Ignore the last one with the blank line. You did fix it with the new beta-update. Thanks. ![]() Last edited by Divingduck; 12-09-2013 at 06:47 AM. |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to make Sigil live | varlog | Sigil | 136 | 10-25-2013 02:34 PM |
how many tocs does Sigil make? | Gregg Bell | Sigil | 17 | 01-31-2013 09:39 AM |
How do I make all .pdf's in my calibre library open in calibre instead of preview | morbo3000 | Library Management | 9 | 07-30-2011 10:39 AM |
using sigil to make changes befote conversion | alansplace | Sigil | 11 | 06-07-2011 07:50 AM |
i can't make sigil run in fedora 14 | nastarovia | Sigil | 1 | 01-20-2011 05:02 AM |