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")