-
February 19th, 2001, 09:23 PM
#1
How to insert New Line for text file ?
I using FileWriter to write a string to text file and open using windows notepad.
e.g.
write("This is new line");
write("\n"); // or using write("\r");
when i run this for 2nd time, the output should be view as below in the windwos notepad :-
This is new line
This is new line
but in the windows notepad, what i see is :-
This is new line#This is new line
# = square bracket (sorry i can't draw square bracket here)
For others Text Editor, is work just fine. Only Windows Notepad got this problem.
Anyone know what the windows notepad newline format ? is that an ASCII for ENTER key ? and what is the ASCII for ENTER key ? or ?
Please help. Thanks.
-
February 19th, 2001, 10:32 PM
#2
Re: How to insert New Line for text file ?
Hi,
I managed to solved the problem.
just include the /r/n together.
e.g
write("This is new line");
write("\r\n");
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|