Quantcast
Channel: Adobe Community : Popular Discussions - Archived Discussions
Viewing all articles
Browse latest Browse all 21156

Insert line break into .txt file

$
0
0
Alright, so I am writing out to a simple .txt file, and I need to force a line break in it. My immediate thought is to use "\n" as that is a line break. So, I write it out to the text file, and instead of a line break, I see the "complex character" symbol (you know, that square that shows up with unknown characters). I have tried the various ASCII values to no avail, tried \r, even tried copy-pasting a line break in from notepad. Nothing seems to be working for me. How do I do this?



_logFile = "\n";

stream = new FileStream();
stream.open(file,FileMode.WRITE);

stream.writeUTFBytes(_logFile);

stream.close();

Viewing all articles
Browse latest Browse all 21156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>