Txt File Windows format in MacOS

Hi,

I have small problem:
I use this code for save in txt format:

Dim s as FolderItem
  Dim t as textoutputstream
  Dim intA as Integer
  Dim strA as String
  s=GetSaveFolderItem("text/plain","")
  if s <> nil then // Check file is define
    t=textoutputstream.Create(s)
    't.writeline txtName.Text 
    't.writeline txtDescription.Text 
    For intA = 0 to lbHeating.ListCount - 1
      t.writeline lbHeating.Cell(intA,1) + ":" + lbHeating.Cell(intA,2) 
    next
    t.close
  else
    MsgBox "Please define file"
    Return False
  end if
  Return True

Works perfectly in Windows, the txt file is save with end of line CR LF
In mac Os, only LF.

I have tested with:

    t.writeline ConvertEncoding(txtName.Text,Encodings.WindowsANSI) 
    t.writeline ConvertEncoding(txtDescription.Text,Encodings.WindowsANSI) 
    And 
    t.writeline ConvertEncoding(txtName.Text,Encodings.UTF8) 
    t.writeline ConvertEncoding(txtDescription.Text,Encodings.UTF8) 

No change

What is my mistake?

Thanks
Olivier

It is working properly
On an Mac, LF is the line end

If you want always to have Windows line endings, change this line

t.writeline lbHeating.Cell(intA,1) + ":" + lbHeating.Cell(intA,2)

to

t.write  lbHeating.Cell(intA,1) + ":" + lbHeating.Cell(intA,2)  + EndOfLine.Windows

Thanks to reply.
The file created is for external hardware using only windows text format.

Your solution, works. I have tested before post : t.writeline lbHeating.Cell(intA,1) + “:” + lbHeating.Cell(intA,2) + EndOfLine.Windows
Not works.

The solution is t.write.

Many Thanks
Olivier