Recent

Author Topic: Strange result of text sorting in TFPSList.Sort  (Read 1857 times)

ASerge

  • Hero Member
  • *****
  • Posts: 2469
Re: Strange result of text sorting in TFPSList.Sort
« Reply #30 on: November 05, 2025, 10:29:05 pm »
Locale for unicode? There are no means to set a locale for unicode.
Don't get confused. These are different concepts.
"Unicode" is a universal character encoding standard that assigns a unique numerical value to every character, symbol, and emoji across all writing systems (from Google).
"Locale" is a collection of language-related user preference information represented as a list of values (from Microsoft).

I just said that it doesn't matter if you use WideString or AnsiString, the sorting is determined by the locale.

PascalDragon

  • Hero Member
  • *****
  • Posts: 6235
  • Compiler Developer
Re: Strange result of text sorting in TFPSList.Sort
« Reply #31 on: November 06, 2025, 08:58:36 pm »
Alex is asking for consistency across platforms for an rtl provided function.
That is a perfectly legal request. It would break his cross-platform code otherwise.
I totally see his point and it should be consistent out of the box.
We are not talking collations platform level, but collations RTL level.
On the RTL level the results should always be the same. (or pluggable, which it is not, well, a bit)

Wrong. The RTL function uses an OS function to achieve the sorting and the RTL does not know what the OS does here and it also depends on the concrete settings of the OS. That this is different is correct and expected.

 

TinyPortal © 2005-2018