Hello:
When I do a search using regex \r\n for line endings there are never any found even though the status bar reads that the file is Windows. The regex \n will return every found line ending in the same test example.
When a file is created by processes I have written it always shows in the status bar as Windows. Even in this event the line ending are never found by regex \r\n but will be found by \n
I use Windows 10 and I prefer using \n as a line ending
Questions:
-
What makes the status bar read the file as a Windows file?
-
How can the documents created be recognised as Unix files and not Windows?
The key to understanding question 2 is to have a common idea of what created is as opposed to me opening the file editing and saving. If I open a new file and edit save the file; it will be a Unix file. Sublime here is all set to save as Unix if I save the file. When a file is created a process has manufactured the file and saved it. I open it from a folder and it is recognised as a Windows file even though the line ending can not be found by the regex \r\n unless I specifically replace all \n with \r\n
One more question:
When I specifically replace all \n with \r\n the line ending are visible as <0x0d>
This I do as a test not as a convention.
The question is âWhere is this setting found that displays the line endingâ
I ask as it will be useful later.
Note:
Since 2018 Microsoft has built-in compatibility for line endings.
https://devblogs.microsoft.com/commandline/extended-eol-in-notepad/
Thanks in advance for your time and consideration, Gilly