Hi Harm,

Quote Originally Posted by Harm Wibier View Post
Sure, it isn't perfect, as we do not live in a perfect world. All I can do is explain how it works and if you have suggestions on how to make it better, feel free to let us know!
We’re always happy to contribute Harm. I think the frustration is we couldn’t see any light at the end of the tunnel on this one. However, perhaps there is something that can be done to help.

Quote Originally Posted by Harm Wibier View Post
Strings comparisons in the language now compare unicode strings, which can hold a virtually unlimited number of characters. The old string comparison logic relying on the order specified in DF_Collate.cfg obviously did not hold up and we have replaced that with string comparison logic provided by the ICU library. Customization can be done by setting the DF_LOCALE_CODE which is actually passed on into the ICU library. See this post for some information on how to use it.
I took your demo sample Harm and experimented with it by adding the data where the sql server collation and string comparison differs. After cycling through the various options, I hit upon one that worked. I took this and added the code to change the locale prior to finding and this has worked.

Click image for larger version. 

Name:	2020-08-14_11-23-50.png 
Views:	105 
Size:	32.4 KB 
ID:	13902

Click image for larger version. 

Name:	2020-08-14_11-34-34.jpg 
Views:	97 
Size:	148.4 KB 
ID:	13903
Quote Originally Posted by Harm Wibier View Post
It would be great if we could somehow create a list DF_LOCALE_CODE strings for the various SQL collations that are available. I am not sure if we can match them all perfectly.
I like Marco’s suggestion. If we had a utility that took a sql server collation and then generated the appropriate local settings for string comparison that would go a long way to taking out the guesswork.

Quote Originally Posted by Harm Wibier View Post
So in DataFlex 2020 the usage of DF_Collate.cfg is limited to being used only for the generation and usage of embedded database indexes. While we could have hooked this up with the new string comparison logic, but we did not as this would create an incompatibility between older DataFlex revs and 2020. We have (prototyped) an example of how to generate a DF_Collate.cfg that matches the ICU collation used by DataFlex. If you are interested in that I am happy to send it to you, but it is pretty rough as we haven't decided what to do with it yet.
Totally agree. So far, in DF20 we haven’t noticed any change with the embedded database collation and string comparison. My understanding is as long as we don’t try to mix databases i.e. sql server with unicode characters (nvarchar) and embedded it should be fine. However, this is not something we support in our application. There is no half-n-half, sites are entirely embedded or sql server.

Assuming my understanding is correct then the utility you mention should only be needed when mixing databases? Harm I am certainly interested to take a look even if it is just to get a better understanding of ICU collations. Thanks.