Reputation: 21
Working with Intersystems cache and writing a file out to a unix server and upon opening in WordPad++ the Carriage return is missing but the Line feed is still there. Our process works in windows but for some reason not in Unix.
Upvotes: 0
Views: 201
Reputation: 3205
You can just manually set LineTerminator, which is by default for UNIX systems only $c(10)
set fs = ##class(%File.Character.Stream).%New()
set fs.Filename = "/tmp/somefilename"
set fs.LineTerminator = $c(13,10)
do fs.WriteLine("Text Line 1")
do fs.WriteLine("Text Line 2")
Upvotes: 1