All these calls do not split a given text which contains windows line endings.
I know that it makes no sense to split a string containing Windows line breaks with Unix line breaks. Please spare me with comments about this, it’s just a test series.
lStringArray6 = lString6.Splitt(" ")
Splitting with a space works fine…
Unfortunately I cannot test on native windows x86-64 in order to check if it is a common windows issue or only an windows arm64 issue. I have also tried to build the x86-64 version and run it on windows arm with no success. I tried building the windows x86-64 and windows arm64 of the test-project on macOS and run it on windows arm with no success.
Can anyone confirm this, comment the issue and upvote the issue?
It is a real show stopper for us, as we cannot test our application on windows arm with this bug. The issue contains a test-project to show the problem.
Any ideas to workaround this or to modify the code are welcome…
That is not a workaround. It is by far the best way to get a consistent result regardless of the source of the data, or the platform it runs on. You may THINK it has a given sequence since you are on Windows or whatever, but my standard practice has always been to use ReplaceLineEndings() to get to a known sequence, and then Split() on that sequence. (And regardless of the platform you are on, if the source originated on another machine – like an attachment or from a website or whatever – you have no suitable expectation of what is in the source.
we always normalise line endings here with ReplaceLineEndings before doing such a split().
You can’t predict what type of line endings a text has, when you can’t control the source.
e.g. user may edit a record on MacOS and put in CR or LF for line endings on saving. Windows user reads it and can’t split on CRLF.
I sadly learned that when storing content in a Xojo constant using copy/paste Xojo destroys the pasted content changing it. One known interference is replacing whatever line endings you pasted to just Chr(13). CRLF becomes CR, LF becomes CR. Looks much like to what you are seeing.