Created attachment 143986 [details] Example for "alphanumeric" and "phone book" sorting For data ranges with German words a sort algorithm "phone book" is provided. But it doesn't work. It results in the same order as "alphanumeric". I got a "phone book" sorting last in OOo1.1.5, already in OOo2.3.4 it was broken. The attached file has a data range DataA for alphanumeric sorting with expected values in column B and a data range DataD for phone book sorting with expected values in column E. About phone book sorting see https://de.wikipedia.org/wiki/Alphabetische_Sortierung. In alphanumeric sorting ä is treated as a; in phone book sorting ä is treated as ae.
On pc Debian x86-64 with master sources updated today, I could reproduce this.
It seems we fail to indicate the use of phonebook to ICU, here's the content of icuLocale (https://opengrok.libreoffice.org/xref/core/i18npool/source/collator/collator_unicode.cxx#373): (gdb) p icuLocale $64 = {<icu_62::UObject> = {<icu_62::UMemory> = {<No data fields>}, _vptr.UObject = 0x7ffff7423bd0 <vtable for icu_62::Locale+16>}, language = "de\000]UU\000\000`\t\377\377", script = "\000\177\000\001\200", <incomplete sequence \362>, country = "DE\000U", variantBegin = 6, fullName = 0x7fffffff0960 "de_DE_PHONEBOOK", fullNameBuffer = "de_DE_PHONEBOOK\000`'\306]UU\000\000\021\333)\334\377\177\000\000p\t\377\377\377\177\000\000\350\017\377\377\377\177\000\000h'\306]UU", '\000' <repeats 14 times>, "\377\177", '\000' <repeats 18 times>, "p\256\230XUU\000\000h'\306]UU\000\000\240\347\371\367\377\177\000\000\000\000\000\000\377\177\000\000\240\347\371\367\001\000\000\000\000\n\377\377\377\177\000\000\272\064\366\367\377\177\000\000\240\347\371\367\377\177\000\000\330?\323]U", baseName = 0x7fffffff0960 "de_DE_PHONEBOOK", fIsBogus = 0 '\000'}
I gave a try with https://gerrit.libreoffice.org/#/c/58870/ The sort of the example with phonebook collation works but I'm not sure if it may break something in the ICU calling mechanism. So hope some reviews.
Julien Nabet committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=13db6e8671c36e1a028d6a8ad63f518e60f84870 tdf#119117: get phonebook sort work by tweaking ICU call mechanism It will be available in 6.2.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Julien Nabet committed a patch related to this issue. It has been pushed to "libreoffice-6-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=5bec6b86cb08b814076f4bf51aee1547f13b61ec&h=libreoffice-6-1 tdf#119117: get phonebook sort work by tweaking ICU call mechanism It will be available in 6.1.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Verified in Version: 6.2.0.0.alpha0+ (x64) Build ID: 414ef6cb187dd3bbcc917dbedf3c0c1cc8668f60 CPU threads: 8; OS: Windows 10.0; UI render: GL; TinderBox: Win-x86_64@42, Branch:master, Time: 2018-08-21_00:13:04 Locale: de-DE (en_US); Calc: CL