View Single Post
Old 09-29-2020, 02:15 PM   #1492
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
Quote:
Originally Posted by chaley View Post
It is there now. I probably did what I often do, forgot to press the "upload" button after adding the attachment.
Got it. What I've done so far is take two random ebooks - one short story, one novel - and first save them untouched, then clone two copies of each and run my standard script under 1.4.1 and 1.5.9, both under calibre 4.23 on Win10/32. So, as close to identical conditions as I could get. Once I had those, I unpacked the modified ebooks into separate folders and ran a DOS file comparison on the lot, both in binary mode and the looser text mode.

Results, short form:

In this environment, 1.5.9 saves its modified text files with CRLF EOLs, while calibre's editor and 1.4.1 both use CR EOLs. This constitutes a very minor bug, but it is nonetheless a difference in behavior.

Results, long form:

1.4.1 saved the modified files with UNIX EOLs (CR only), while 1.5.9 saved them with DOS EOLs (CRLF). One of the short story sections displayed a phantom text-comparison difference that looked like an extra linefeed, but bringing both modified copies into Notepad++ and changing the 1.5.9 version to use UNIX EOLs made them byte-identical. The same behavior showed up in the longer book as well, and I don't see a pattern. Some chapters display several instances, while others show none at all.

I should note that in the case of at least one file for each book, this extends to a known-static file which my copy of calibre custom-generates: titlepage.xhtml. (I use different stock cover page code, but it's a calibre source file mod; it doesn't come from the books.)

It turns out that loading the beta book into the calibre editor, making and undoing a minimal change to an affected file, resaving the book, and extracting that file results in its EOLs being changed to the CR format, which is why I conclude that this is a quite minor bug in 1.5.9.
Rev. Bob is offline   Reply With Quote