Reputation: 2049
if I do with powershell that
[string]$text = "this `nis a `ntest"
$text > c:\test.txt
with notepad++ this is the result:
this
is a
test
but if I open it with notepad of windows it doesn't work:
this is a test
why that? how can I fix it?
Upvotes: 3
Views: 384
Reputation: 28174
Notepad exclusively uses Windows CRLF EOL
markers. To get your line breaks to show in Notepad, use this:
`r`n
Reasonable text editors (read: almost everything but notepad.exe
- I'm partial to Notepad++) handle all EOL styles properly - CRLF, CR, and LF.
Upvotes: 8