Notifications
Clear all

[Closed] output text file line end code LF instead of CRLF

Hej There,

I was wondering how can I output my data with LF line ending into a textfile instead of the usual “CRLF” by
.
Any ideas? Thanks!

7 Replies

Use hexadecimal \x0A instead of
.

Cheers,

Drea

1 Reply
(@losbellos)
Joined: 11 months ago

Posts: 0

nope, unfourtnately it is still CRLF
Some people mentioned that it is something to do with the os, but I hope there is still a way to fix this.

for now I use CRLFtoLF.exe to convert it to LF, but soon it will be complicated.

in the help file:
replace_CRLF_with_LF <string>

Avguard Extension

edit:
but testing DreaTawn suggestion also works

It does output cr/lf on max 2009 64 bit on winx64 bit. What max version do you have?
maybe I will have a chance to try on different versions.

This string replace could work, willl see. Thx.

here is an image of the result.
I try to put the lines into string and then save it into text file. I guss it would be less effecient.

Perhaps it is even simpler:

createfile "d:\\for_Linux.ms"
rufile = openFile "d:\\for_Linux.ms" mode:"wb"
format "In a Big Country
Dreams stay with you
Stay Alive" to:rufile
close rufile

open the file as binary…

thanks this binary mode works,
interestingly I tried this as well but with fopen fclose etc and there didnt.

Thanks a lot.