I was editing some text in a Xojo TextArea and the resulting text was not what I had typed. I tried it again, with the same results. I tried it again in a default RTF TextEdit document (doesn’t work in Plain Text) and it did the same, so it is an Apple bug.
Here is the original text: MyField = '2022-01-01'
What I want is: MyField = '2022-01-01 00:00:00'
After the space and first zero, Apple decides my plain quote character needs to become a right-curly-quote, and replaces it, but leaves the cursor now AFTER the curly-quote, not before, so the text becomes (note the new curly-quote): MyField = '2022-01-01 0’0:00:00
I am on a Monterey beta, but I expect it is an old bug.
Well, this would work for you, but if your user hasn’t done the same, it’s a problem. Also always check/replace smart quotes in user input (e.g. if you need clean code) in case they haven’t turned it off…
Set your macOS language to French and do the same with "… it will be replaced with “« " (note the space after the « sign) or " »”… the space is certainly a non breaking space (per grammar rules, not checked).
Of course Thom is correct, but what can be done: it is the user computer and the replacement (a user locale) normally follows the language settings.
Something to try for fun!
Add two spaces characters inside Xojo Code Editor and cry… they will be replaced with dot-space… Still the same settings rules.