Posted By: Henning
How to make a Linefeed at a written Text File? - 12/01/09 08:32
Hello,
does anybody know how to write a linefeed (new line) with file_str_write into a text file? "\n" does not work and file_asc_write(fhandle,10) does not work either. There just appears a rectangle, I think that represents non interpretable text. All written data is always stored one after the other, that is badly readable.
Thanks
Henning
Posted By: seecah
Re: How to make a Linefeed at a written Text File? - 12/01/09 09:32
Did you open the text file through notepad.exe.. If yes then I think that's normal that you just can see a rectangle for which I don't know what the reason is. I've tried that also, try to download notepad++ and there you can see the exact contents of the file.
Indeed "\n" works but it's just that notepad.exe can't interpret it perhaps..
"\n" is just enough to write a linefeed..
Hope that helps..
Posted By: Anonymous
Re: How to make a Linefeed at a written Text File? - 12/01/09 09:48
file_asc_write(fhandle,10) lf
file_asc_write(fhandle,13) cr
(maybe 13->10)
Posted By: Helghast
Re: How to make a Linefeed at a written Text File? - 12/01/09 13:58
bit of a hack, but what i used to do is simply:
var filehandle = file_open_write ("myfile.txt");
file_str_write(filehandle,"
"); // Yes, this is indeed on a new line...
file_close (filehandle);
simple as that
hahahaaa
regards,
Posted By: Henning
Re: How to make a Linefeed at a written Text File? - 12/02/09 15:05
Hi,
thank you all, simple solution, seecah is right, you do not see it with notepad, with Wordpad or Word, you see it.
Thanx
Henning