EndOfLine. Windows bug?

With Parallels on my iMac I’m able to run Xojo 2016 r4.1 on Windows 10. I’ve found what I believe to be a bug.

With Xojo on Windows create a new project with two TextAreas and a Go button.

The button’s Action script is:

Dim outString As String
outString = TextArea1.Text
outString = ReplaceAll(outString, EndOfLine.Windows, " ")
TextArea2.Text = outString

Click the Run button and enter into TextArea1:

1
2

Click Go. In TextArea2 youi’ll see:

1
2

But that should have been:

1 2

The same Xojo project script on my iMac, with EndOfLine.Windows replaced by EndOfLine.OSX does give the expected output

1 2

So it appears to be a bug associated with Windows.

Bob

Line endings are tricky.
You need to use ReplaceLineEndings on a string to change the line endings into one you’re expecting before you attempt to use the EOL constants and ReplaceAll

Tim,

Thanks. That was the solution.

Bob