I have a question, not confined to Unicode.
We have an important C API in our system, one thing it does is support
in-memory indices (AVL trees) on data. Now when it comes to string keys, we
have an issue.
Windows seems to have two ways for deciding of string_a is > or < string_b.
Naturally for an index we need to evaluate > and < for keys.
There are a ton of string functions available in the SDK, _strcmpi and many
many others.
However, it seems that Windows relies on a registry key: NoStrCmpLogical
That is the "sort order" in Windows file Explorer will either order one way
or another and the registry determines which.
My question is this, can I programmatically do this, could I allow our API
so we can set a "compare mode" that controls this ordering without recourse
to the registry?
This article sheds more light on the problem:
http://www.vistax64.com/tutorials/132144-sort-order-numbers-file-folder-names.html
When using basic strcmp we noticed that we had no control on this ordering.
My confusion is that I don't know what issues (Locale etc) play a role here
and match up with the registry's NoStrCmpLogical setting.
Does anyone know how this works? I mean does the setting for NoStrCmpLogical
simply cause Windows to use some or other Locale setting internally?
Thx
H