Bug 119117 - German sort algorithm "phone book" does not work
Summary: German sort algorithm "phone book" does not work
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.2.0 target:6.1.1
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-05 22:03 UTC by Regina Henschel
Modified: 2020-03-21 23:59 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Example for "alphanumeric" and "phone book" sorting (10.91 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-08-05 22:03 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2018-08-05 22:03:00 UTC
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.
Comment 1 Julien Nabet 2018-08-10 16:54:03 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.
Comment 2 Julien Nabet 2018-08-10 22:12:59 UTC
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'}
Comment 3 Julien Nabet 2018-08-10 22:32:43 UTC
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.
Comment 4 Commit Notification 2018-08-17 18:01:39 UTC
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.
Comment 5 Commit Notification 2018-08-24 15:33:36 UTC
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.
Comment 6 Regina Henschel 2018-08-27 22:42:19 UTC
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