Sorting Chinese strings in Xojo app differs from in Windows Explorer

Hi All,

I have some files (Chinese names) on my computer. When they are shown in Windows Explorer, they are in a proper sorting order which is “simple” characters goes in front of "complex “characters”. Simple characters mean ?, ?, ? etc (less “lines”), complex characters mean ?, ?, ? etc (more “lines”).

For the same set of records, when added to a desktop Listbox, and pressed the header to sort, the order is somehow different, I can’t say what the pattern is but it just goes different with how it sorts in WE. It is not in a messy order but something like this:

???
???
???
???
???
???
???
???
???

Any ideas?

Mac? Win? Linux? iOS?

Win10, Xojo 2017r1.1

maybe you build your own sort methods.
Not sure if a custom sort routine with StrComp would do better.

You can control this using the CompareRows event.

Listbox just uses a string comparison, whereas Windows Explorer and macOS Finder are a little more context specific. For instance, they will sort numbers numerically so that 100 comes after 99, whereas listbox will do:
1,11,12,13,14,15,16,17,18,19,100,2,21,23…
Which is an “alphanumeric” sort.

Thanks, will have it a try