by Michael S. Kaplan, published on 2005/12/22 10:01 -05:00, original URI: http://blogs.msdn.com/b/michkap/archive/2005/12/22/506595.aspx
I have talked many times in the past about Ordinal and OrdinalIgnoreCase sorting behavior and when you might want to use it (such as here and here and especially here, for example).
I went to great lengths to point how the reason that the managed 'OrdinalIgnoreCase' functionality was important to help mimic the OS behavior with regard to symbolic identifiers.
Of course there was one problem: no Win32 function exists that allows support for this type of comparison. So the actual platform that needed the behavior required some extra work to actually happen.
Now it isn't much work, but still...
Anyway, that all changes in Vista, with the new CompareStringOrdinal function we have added to the NLS API.
The documentation notes all of the various linguistic types of comparisons that the function does NOT handle, so that people can work to get the behavior they want, depending on what they are trying to do.
So now that we can get the answer for Windows and the .NET Framework, all we need is a faster way to make the SQL Server binary collations have this admittedly un-natural comaprison behavior as well!
This post brought to you by "Ʃ" (U+01a9, a.k.a. LATIN CAPITAL LETTER ESH)
# Mihai on 22 Dec 2005 12:59 PM:
# Michael S. Kaplan on 22 Dec 2005 1:12 PM:
# Michael S. Kaplan on 22 Dec 2005 1:45 PM:
# kevinowen on 22 Dec 2005 2:05 PM:
# Michael S. Kaplan on 22 Dec 2005 2:19 PM:
2006/05/24 Invariant vs. Ordinal, the third
2006/05/12 Don't use lstrcmp if you don't need it
go to newer or older post, or back to index or month or day