Hello wine-devel,
this is my new patchset to implement string comparison on top of the official sorting weight tables from windows. While not necessarily finished, I'd like a review of what I should change before I continue.
This time I started with reimplementing sortkey generation, since it's both cleaner and less intrusive to the codebase - a lot more programs use CompareStringX compared to direct sortkey generation. After that implementation is finished, I plan to build CompareStringX on top of that. CompareStringEx "should" yield the same result as a sortkey comparison, but it does not. That because it cuts corners for performance, that's why I focused on the accurate sortkeys first.
A few major changes compared to my last patchset: - Now with more tests that test different edge-cases in sorting - A list implementation that tries to go without allocation memory all the time (Not sure if that's the best way to go about that though) - Only sortkey generation altered - Using Win10 NLS data from Wine
Please note that not all features of a full sortkey generation are implemented, like compression, surrogates, multicharacter sequences, and so on. If you want me to include that for review, please tell me.
Also note that all tests are handcrafted, since I don't know of a way to systematically test string sorting - it's just too many combinations. If you know of a way, please tell me.
Looking forward to your comments!
Regards, Fabian Maurer