In the default behavior of data sorting in Calc (Writer as well, see reference questions), the sorting algorithm is not following Unicode/ASCII code, which I think it's an intuitive and reasonable default behavior. If it is not, what kind of behavior does it follow? I didn't find any document explaining the default sorting algorithm or behavior. Language/locale settings? Opening with en_US.UTF-8 locale got the same result.
You can visit the reference 2. I'll attach the file here later.
It may not be a bug, but a user experience issue.
Steps to Reproduce:
1. Open the attached file
2. Data -> Sort Column B as ascending
3. The result does follow ASCII/Unicode code
The result does follow ASCII/Unicode code
- Following ASCII/Unicode is a reasonable default behavior IMO
- If not, any document describing the default sorting algorithm?
- If not, any option to force following ASCII/Unicode order? (Filling every character in Tool - Options - Calc - Sort List is NOT a user-friendly solution IMO)
User Profile Reset: No
Earliest version I tested: 版本 220.127.116.11 (組建 ID：e183d5b)
Should be inherited from OO.o I think.
Created attachment 185127 [details]
Demo ods file for data sorting
At first I thought following the ASCII/Unicode order is quite reasonable default behavior for sorting string data. But… on second thought, our locale is zh_TW.UTF-8, and the unicode order for Chinese numbers does not really follow the number order, so maybe it is really a language issue and can be costumed by the Sort List. I just need a reasonable explanation about the default sorting algorithm, and a *user friendly* way to set the sorting algorithm to follow the unicode/ASCII order.
For completeness, just adding what I gathered at Ask
Sorting order is defined by the Unicode Collation Algorithm (UCA) https://unicode.org/reports/tr10/ and LibreOffice uses the ICU https://icu.unicode.org/ implementation. Collation details may even depend on locale. See ICU Collation Demo https://icu4c-demos.unicode.org/icu-bin/collation.html .
For zh-TW there is some specific tailoring for the different algorithms, see i18npool/source/collator/data/
the zh_TW_*.txt files.