0
使用Intersystems缓存并将文件写入到unix服务器,并在WordPad ++中打开时,回车符丢失,但换行依然存在。我们的过程在Windows中工作,但出于某种原因,不在Unix中。当系统缓存写出文件时,Linux摆脱回车返回
使用Intersystems缓存并将文件写入到unix服务器,并在WordPad ++中打开时,回车符丢失,但换行依然存在。我们的过程在Windows中工作,但出于某种原因,不在Unix中。当系统缓存写出文件时,Linux摆脱回车返回
您只需手动设置LineTerminator,这是默认的UNIX系统仅$ 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")