View Single Post
Old 07-29-2026, 04:08 PM   #7
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,842
Karma: 7500000
Join Date: Nov 2009
Device: many
And for what it is worth, Sigil uses Qt's QTextStream for writing out files and it has the following default behaviour:

Quote:
By default, QTextStream automatically translates line endings depending on the operating system and whether the underlying QIODevice is opened in text mode (QIODevice::Text). On Windows, writing a newline via \n or Qt::endl typically gets converted to CRLF (\r\n), while reading handles both LF and CRLF transparently.
so this is built-in behavior for Qt and their QTextStream class implementation, which means we would have to write files on Windows in binary mode to prevent Qt from doing what it does.

And it is the default for writing text in python3 on Windows as well. So both Qt and python3 both do this by default for text file writing on Windows. Sigil seems to be in good company.

Last edited by KevinH; 07-29-2026 at 04:21 PM.
KevinH is online now   Reply With Quote