and N sorting

Hello,
in Spanish, sorting a list, words starting with are supposed to follow words starting with N; for instance Nina is followed by ina
Yet, when I sort a list box, words starting with precede words starting with N: ina is followed by Nina.
Any suggestion how to fix the problem? Thanks.

Here is my CompareRows event:

[code]Function CompareRows(row1 as Integer, row2 as Integer, column as Integer, ByRef result as Integer) As Boolean
soft declare function CFStringCompare lib “Carbon.framework” ( s1 as CFStringRef, s2 as CFStringRef, opt as UInt32 ) as integer
dim options as UInt32 = 193//800//1 + 128 + 512 //kCFCompareCaseInsensitive || kCFCompareDiacriticInsensitive || kCFCompareForcedOrdering

result = CFStringCompare(me.cell(row1,column), me.cell(row2,column), options )
Return True
End Function
[/code]

I had the same question recently, but with SQLIte Sorting.

The answer Dave gaves me was…

Xojo is NOT case sensitive, but SQLite is (UNLESS you tell it not to be) [s]add " COLLATE NOCASE" to the end of you SQLite query[/s]

So look at the words that ends with the Insensitive suffix in your code.

My bad. As it happens, the solution was under my nose!
dim options as UInt32 = 641 fixed it.

Sorry for the unnecessary noise!

Carbon ???

@Emile Schwarz I saw that thread, but this particular list is not dependent on SQLite, so the above code seems all right. Thanks.

I guess I got the snipped years back from the NUG. MAS does not complain.

No, the problem was the same and the answer too as you discovered: you had to make the sort Case sensitive.
(watch in your comments: kCFCompareCaseInsensitive || kCFCompareDiacriticInsensitive)

The main information here is you found your answer.

Ooo, I get to use my new gif :wink:

Double Ooo!