Sonoma uses a different CodePoint for "space" when DateTime values are retrieved as String

Using Xojo 2022r4.1 with Sonoma causes some issues with a listbox. I have a Listbox where the data for the cell is stored in a celltag. When I click on the listbox cell, the data loads in a Dialog window.

Some cells don’t load the correct data. Some clicks load the data for the cell four rows or so above that but it isn’t consistent. I could get the correct data on one click, then click the same cell one row below (or two, three, or four rows below that cell) and get the same data.

Hoping there is some kind of work-around for this.

you should add an issue (top menu bar here at the right) with a simple example.

debug print what you fill in the celltag for row and column
debug print what you read at row,column

have you looked if the correct row was choosen by xojo and mouse input?

I had Sonoma on my laptop so as not to have to upgrade my programming machine. In order to make debugging easier, I will bite the bullet and upgrade to Sonoma, rather than do remote debugging and get back to you.

Have you tried installing the Xojo Remote Debugger on your laptop and then run the program remotely on the laptop with Sonoma?

Might save you some grief vs. installing Sonoma on your main development machine…


Edited to include a link to the “Remote Debugging” section of the Xojo Documentation

1 Like

So it turns out that it wasn’t the listbox that was the problem; it was the API 1 string functions to parse the data weren’t working the same in Sonoma.

Mid functions and InStr functions were working differently, so the data was not being parsed correctly and so the proper data was not being pulled up.

I was trying to pull the minutes from a cell with time formatted with AM/PM.

Specifically, the following code no longer worked correctly:

dim s as String = Listbox1(row,column) //"9:15 AM"
vMinute =CDbl(Mid(s,InStr(s,":")+1,InStr(s," ")-2))

because if wasn’t returning the position of the space (" ") correctly in Sonoma.

When I used the position of another character, such as the colon (“:”) or the M (“M”), it works.

There was another post on the forum about Sonoma and time formatting.
The space between the digits and AM/PM isn’t a space anymore but a non-breaking space.

So it makes sense that using Instr(s," ") wouldn’t work anymore.


row tag and cell tag are variant, you can put any object in.
you could use this object to display the cell value at cell paint event.

Thanks for clearing this up.

I have done remote debugging before, but in this case I felt it best to go all in and install Sonoma.

Actually, I have to say that the transition to Sonoma is very smooth and I actually prefer it over Ventura.

This is a “feature” decided by the Unicode Consortium, so all languages using ICU libs should be affected following those standards at some point. That’s not the only place, some other places needing some “glue between the parts” or ligatures where introduced over the years in multiple languages/locales. AM/PM is part of the US standard time (and some other British colonized places), so it must be rendered with it, closer than an usual space. ICU renders date and time and makes that for proper locales.
Some people complained and the answer was: you should not be depending on the human readable output, for machine processing use ISO 8601.

Sorry for chiming in… but, at this point, looks like the thread title doesn’t really match the problem? :grimacing:

1 Like

Yep. Sonoma is not the culprit. Nor ListBox.

Ok, so if we agree… I’m going to change the title to something more in line with the real problem discussed, is that ok? :wink:

1 Like

Ok, from me. Get the authorization from the OP and act immediately, get consensus from enough number of users in this thread and do it anyway too. In any circumstances contact the OP via PM talking about the intervention.

Good idea. I am definitely ok with that.