Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

From my iPhone application I'm outputting data from text to a file. When opened with windows notepad, the data is all on one line and where there should be a new line a block character is present (showing that it's an unrecognized character or something). When opened with windows wordpad, it displays just fine.
Would there be something wrong in my code? I'm simply output ' ' when i want a new line.

enter image description here

NOTE : It's working fine with other editors like textedit, MS Word on mac as well as on windows.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
392 views
Welcome To Ask or Share your Answers For Others

1 Answer

Windows default is to use as end-of-line marker. Notepad only recognises that, other text editors may know about other line-end styles and render correctly.

EDIT
As VonC answers Notepad had an update (in 2018) where it now can recognize non-Windows end-of-line sequences.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...