I made some tests after finding some inconsistencies on the way EndOfLine is handled on mac and windows (all my tests on Linux are consistent).
I made a simple project, 2 TextArea, 2 buttons to break and check values, a button to use clipboard to copy from TextArea1 to TextArea2 and a button to check if the TextArea values are the same. It looks like this:
Then I write:
on the left TextArea. The hex values are: 310A 320A 33
Then I select all and do a copy/paste to the right TextArea. The values stayed the same. If I click the ‘Equal?’ button it say the contents of both TextAreas are the same.
Then I click the ‘Clipboard’ button, to use this code:
Dim c As New Clipboard
c.Text = TextArea1.Text
TextArea2.Text = c.Text
Now the right TextArea look exactly the same, but the hex values are: 310D 320D 33. Pressing the ‘Equal?’ button will say they are not the same.
Now the most interesting part. Select all on the right TextArea (with the 0D end of line), do a system copy/paste over the values on the left TextArea and check the hex values, the values are: 310A 320A 33. So the mac system is changing the chr(13) end of line characters to chr(10), that’s the opposite of what Xojo’s clipboard function is doing. If I click the ‘Equal?’ button it say they are not the same, but if I do a system copy/paste on the right TextArea over the values of the right TextArea, now the values are equal because the system change the ‘wrong’ end of lines.
This is on mac 10.12.6
Note: tested under Linux and the end of line value is not changed, that’s what I expected under mac.
Note2: tested under Windows and the end of line value is not changed, the problem here is that TextArea on Windows just uses 0D and 0D0A is expected
Should I file a Feature request or a Bug report? I expect Xojo’s clipboard behave like the system copy/paste (copy 0A and not change to 0D, and if it finds a 0D to change to 0A)