CHR(13) in Value of textarea


I’m working on Mac and I just found out that a pre-set Value (over GUI) in a textarea uses CHR(13) (Windows) for RETURN. I would expect it would use CHR(10). Then at runtime it really uses CHR(10). I assume the same problem will be on Linux side.

And so the question is ?

Is this a bug? Otherwise how I can I set the value on Mac side so that is stored with CHR(10)?

Use EndOfLine (or eventually EndOfLine.macOS). and the two others…

Also, look at

Thank you… I’m still wondering why Xojo stores text with CHR(13) on Mac

I am wondering why in the Windows desktop, pressing the Delete key while an item is selected opens the .Parent directory ;).

Seriously, why ?
Another answer may be: “MacOS Legacy”.

It may be best in your scenario, if you’re parsing the incoming text, to use ReplaceLineEndings in conjunction with EndOfLine to get a consistent result:

var myString as String = TextArea1.Value.ReplaceLineEndings( EndOfLine.Unix ) var lines() as String = myString.Split( EndOfLine.Unix )