0

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.

Tidesglenn
  • 21
  • 6

1 Answers1

1

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")
DAiMor
  • 3,185
  • 16
  • 24