View Single Post
Old 07-29-2026, 02:17 PM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,844
Karma: 7500000
Join Date: Nov 2009
Device: many
The epub spec properly allows and accepts both cr/lf and just lf as will any xhtml or html document where both are considered whitespace and therefore condensed to one. So both are supported by the epub, xhtml, and html specs.

When reading from Windows, Sigil will strip off crlf to just linefeeds for editing in Qt/Sigil's Codeview, and when saving to a file on Windows Sigil puts them back since open-with and other text editors want crlf on Windows.

So whoever said lf only for epub was mistaken. The whatwg living html spec and xhtml parsers all handle both cases properly.

Quote:
The ⁠EPUB 3.4 specification defines packaging for web content (HTML, CSS, SVG) inside a ZIP container. Line breaks inside these XHTML or text files use standard digital control characters—Line Feed (LF) or Carriage Return + Line Feed (CRLF)—matching general web standards where line endings are handled transparently by XML parsers.

Last edited by KevinH; 07-29-2026 at 03:33 PM.
KevinH is offline   Reply With Quote