Closed garoto closed 3 years ago
On Windows the function open()
opens file in text mode by default. This means that if you try saving a file in MS-DOS format, nano will add a CR
before every LF
, but the CRT inserts another CR
before every LF
, resulting lines that end with CR CR LF
. (By default however, nano does not insert CR
because UNIX EOL is the default, while the CRT still adds a CR
so you get MS-DOS EOLs, which 'works' by accident.)
Please refer to nano's authors for the precise description of noconvert
; I have no idea about it.
Wow, quite complicated but I think I managed to finally get the gist of your answer rationale. And just to clear: by CRT you mean the microsoft "C RunTime"?
ps: sorry for the very late response :/
I've read your readme.md entrie where you wrote:
+ UNIX style end-of-line handling by default.
And I have no issue with it being a default, but I'm wondering what's the rationale on why can't I override it either via CLI argument or via a .nanorc
set noconvert
option, but still able to choose CRLF line-endings withM-D
when saving a file.