Bug 65018 - Sort order incorrect in alphabetical index in localized LibreOffice
Summary: Sort order incorrect in alphabetical index in localized LibreOffice
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.2.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:26.8.0 target:26.2.4
Keywords:
Depends on:
Blocks: TableofContents-Indexes
  Show dependency treegraph
 
Reported: 2013-05-27 00:37 UTC by Donald Rogers
Modified: 2026-05-07 08:42 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Esperanto localized version of one of the User Guides in the documentation wiki. (926.95 KB, application/vnd.oasis.opendocument.text)
2013-05-27 00:37 UTC, Donald Rogers
Details
A test document showing the wrong order of Turkish index (12.65 KB, application/vnd.oasis.opendocument.text)
2024-06-28 09:41 UTC, Fedon Kadifeli
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Donald Rogers 2013-05-27 00:37:53 UTC
Created attachment 79823 [details]
Esperanto localized version of one of the User Guides in the documentation wiki.

I installed the Esperanto language pack (libreoffice-l10n-eo). In ordinary tables in Writer the sort order (Tools > Sort...) works correctly.

I am editing a translation of the user guide GS4002-SettingUpLibreOffice.odt. I created an alphabetical index at the end of the document to check that I had translated all the anchors and cross-references. It sorts the entries into a wrong order. The document language is set to Esperanto and the language of the index is set to Esperanto (see attachment). Note that ĝ should go after g, ŝ after s, etc. Why do accented letters (ĉĝĥĵŝŭ), go out of order?
Comment 1 sophie 2014-03-27 15:14:58 UTC
Confirmed with Version: 4.2.3.2
Build ID: 7c5c769e412afd32da4d946d2cb0c8b0674e95e0 Ubuntu 13.10. Set to New - Sophie
Comment 2 Joel Madero 2015-05-02 15:44:03 UTC Comment hidden (noise)
Comment 3 Donald Rogers 2015-05-05 02:41:31 UTC
I installed LibreOffice 4.4.2.2, with the Esperanto language pack, on Linux Mint 17.
I tested using the same document as last time (the attached GS4002-SettingUpLibreOffice-eo.odt) and got the same result, i.e. headings starting with ĝ and ŝ are sorted to after the end of the alphabet.
In case it was remembering the order from last time, I created a new document into which I pasted most of the text from the attachment, but not the index. Then I created an new index in the new document. The result was the same: incorrect sort order.
Comment 4 QA Administrators 2016-09-20 09:37:51 UTC Comment hidden (noise)
Comment 5 Donald Rogers 2016-09-22 00:11:39 UTC
Tested 2016-09-22
LibreOffice 5.2.1.2
LinuxMint 17

I reran the test of inserting an alphabetical index into a copy of the user guide file and it still sorts the accented letters wrongly – it puts the accented letters ĉĝĥĵŝŭ after z. In this case the last main index items are: vortarojn instali, XML-dosieroj, ĝenerale, Ŝargi/Konservi.

I also ran a test on an ordinary table in Writer and it failed too, but the sort order is different: it treats ĉ as equal to c etc, which is wrong – ĉ must go after c. It gave this order:

Ĉi tiu
citrono
ĝi
giganta
jam
ĵaŭdo
laŭ
launa

which should have been

citrono
Ĉi tiu
giganta
ĝi
jam
ĵaŭdo
launa
laŭ
Comment 6 Xisco Faulí 2017-09-29 08:53:04 UTC Comment hidden (noise)
Comment 7 Donald Rogers 2017-10-11 03:21:31 UTC
Tested 2017-10-11
LibreOffice 5.4.1.2
LinuxMint 17

I reran the test of inserting an alphabetical index into a copy of the user guide file and it still sorts the accented letters wrongly.

I also ran a test on an ordinary table in Writer and it failed too, but the sort order is different: it treats ĉ as equal to c etc, which is wrong – ĉ must go after c.

No change since last year.
Comment 8 QA Administrators 2018-10-12 03:05:32 UTC Comment hidden (noise)
Comment 9 Donald Rogers 2018-11-06 21:44:54 UTC
Tested 2018-11-07
LibreOffice 6.1.2.1
Mint 19

I reran the test of inserting an alphabetical index into a copy of the user guide file GS4002... and it still sorts wrongly.

I also ran a test on an ordinary table in Writer and it was correct.
Comment 10 QA Administrators 2021-01-21 04:05:52 UTC Comment hidden (noise)
Comment 11 Julien Nabet 2022-11-26 08:04:43 UTC
*** Bug 141711 has been marked as a duplicate of this bug. ***
Comment 12 Julien Nabet 2022-11-26 08:06:19 UTC
Code pointer:
SwTOXInternational::Init()
(see https://opengrok.libreoffice.org/xref/core/sw/source/core/tox/txmsrt.cxx?r=24865e2d#76)
Comment 13 Fedon Kadifeli 2024-06-28 09:17:08 UTC
It is interesting to note that this problem persist for more than one decade. Nothing new in version 24.2.4.2!
Comment 14 Xisco Faulí 2024-06-28 09:18:23 UTC
*** Bug 141711 has been marked as a duplicate of this bug. ***
Comment 15 Fedon Kadifeli 2024-06-28 09:41:48 UTC
Created attachment 195032 [details]
A test document showing the wrong order of Turkish index

Since Bug 141711 has been marked as a duplicate of this bug, I am adding another test document here to show the problem.
Comment 16 Fedon Kadifeli 2024-12-02 14:58:29 UTC
Still the same problem with version 24.8.2.1 :(
Comment 17 Fedon Kadifeli 2026-04-30 13:22:01 UTC
*** Bug 171922 has been marked as a duplicate of this bug. ***
Comment 18 Neil Roberts 2026-05-06 09:28:53 UTC
I’ve made a patch which should hopefully fix the Esperanto sorting problem here:

https://gerrit.libreoffice.org/c/core/+/204864

I think the problem with Turkish is unrelated so I will reopen the bug.

There seems to be a separate bug that the sort language selected for an index doesn’t seem to survive saving and reopening.
Comment 19 Commit Notification 2026-05-06 20:50:15 UTC
Neil Roberts committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/88bf2c6533214814f9d963a95f4f7eb979e508b0

tdf#65018 localedate: Fix the index key for Esperanto

It will be available in 26.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 20 Commit Notification 2026-05-07 08:42:11 UTC
Neil Roberts committed a patch related to this issue.
It has been pushed to "libreoffice-26-2":

https://git.libreoffice.org/core/commit/6bd2c3e6200c8587dda3462f8227f888a898d2b7

tdf#65018 localedate: Fix the index key for Esperanto

It will be available in 26.2.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.