High Sierra inserting non-printable characters randomly into text fields?

I’m not sure that this is just a MacOS problem, but it started for me and my users as they started to upgrade to High Sierra. I don’t know if it’s an OS thing or a Xojo thing yet so am asking if anyone else as seen anything similar. It may also be a text encoding change that I’ve failed to grasp or something similar. But it’s a recent hiccup and I haven’t touched any of that in forever.

What seems to be happening is that non-printable characters are being inserted into text fields. Sometimes the data that I’m saving out of user entry fields will include actual ascii backspace characters! I’ve just added another filter for a byte with the value of &h1F which is also starting to show up both on my own test machines and in my users. I’ve added it to the list of characters I filter before saving anything non-binary.

I noticed it because one of the edit fields in question is for entering apple script and the apple script compiler chokes on any such embedded characters. (it also chokes on curly quotes, UTF white space, non-breaking spaces, EM dashes and probably a bunch of other things that I’ve been filtering for a long time now for it)

So sometimes when I hit the delete button it doesn’t actually delete but instead inserts a chr(8) into the text!

The latest stretch of weirdness is affecting other simple text fields in the app, not just the AppleScript editing field. I recently found a user who managed to get the &1F character inserted into an object name which needs to be referenced by the scripts. Of course his units were not found because the names didn’t match as dictionary keys because the actual object name had an unprintable character at the front. When I logged into his system to help I could move the cursor to the front of the name and hitting the right arrow did not move the cursor but hitting it again did so it was sitting at the invisible character. I deleted it the same way and things are working for that user again, but I am going to have to do an update that will filter both scripts and object names now in the existing database to fix anything that is already out there.

Has anyone else seen anything similar? Now that you know to look for it you might.

High Sierra is my least favorite OS update from Apple EVER. Worse even than the one that switched AppleScript to all UTF16 characters but refused to compile any of the scripts if you used any multi byte characters. Worse than the one that broke the AppleScript lookup table for 32 bit apps limiting you to 255 applescript references and which forced me to bite the bullet and get all my declares converted to 64bit so I could build the app that way.Worse than the one that introduced the leak in the same table so that if you run too many scripts they all just start returning errors until you destroy and re-create your OSAScripting instance. And then there was how the APFS file system upgrade broke my exchange files routine so that all my data got written as just empty and now that I’ve fixed that the new rename API that you’re supposed to use for doing an atomic swap of files is about 10 to 50x slower on APFS than even a slow external HFS+ drive. Ugh… the list of problems in this version seems never ending.

the few people I know from either work, family or friends that is running 10.13, have nothing but odd issues. At work (both the VAR I work for an my personal company) have forbidden anyone to use 10.13. We are all on 10.12 and are waiting for 10.14 before upgrading.

I have never seen this issue but with 10.13 it doesn’t surprise me.

Are these Xojo TextFields or TextAreas? Which version of Xojo and 32-Bit or 64-Bit?

I felt that Sierra was an OS release worth skipping…

Wow… Has someone from your VAR used apple.com/feedback to tell them why “High Sierra” is banned? While Cook won’t care, someone in Apple will.

I’m so sad that Apple continues to get it so wrong, and still make copious amounts of money while they’re at it.

Sometimes (when I read this kind of report), I know why I am still with El Capitan…

And that is a certain number of Apple OS releases that I take time to update to :frowning:
(still not knowing why it takes so long for me to update)

Einhugur’s search class inserted ASCII 0 as the first character causing all searches to fail. Now I search and remove it all is OK. Not sure if this is the fault of Einhugur or High Sierra or me.

64 bit compile and both the ones I know about so far that are doing this are textAreas.

I am guessing if its happening both in Xojo TextBox andin our SearchControl on 64 bit then its a bug maybe in the CFStringToRealString for 64 bit (or what its name was) ??

Well that could be, I assume thats something in the PluginAPI that is also used internally by Xojo? I wonder if thats enough info to open a feedback report yet.