Last Comment Bug 992651 - improve locale sensitive sorting of folder names
: improve locale sensitive sorting of folder names
Status: NEW
Product: Thunderbird
Classification: Client Software
Component: Folder and Message Lists (show other bugs)
: Trunk
: All All
-- enhancement (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
Depends on: 853301 981405
  Show dependency treegraph
Reported: 2014-04-06 06:51 PDT by :aceman
Modified: 2015-02-27 13:49 PST (History)
7 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---


Description User image :aceman 2014-04-06 06:51:11 PDT
+++ This bug was initially created as a clone of Bug #981405 +++

Currently the folder sorting function mailnews/base/util/folderUtils.jsm::folderNameCompare() we use to sort folders in some folder pane modes (when we can't use compareSortKeys()) unconditionally uses .toLocaleLowerCase on both the strings to force a case insensitive comparison.

It seems this could be improved to use the new localeCompare functionality at, like this:
aString1.localeCompare(aString2, undefined, {usage:"sort", sensitivity: "accent"})

But for that TB needs to switch to the new internationalization API, something like in bug 853301.
Comment 1 User image Jeff Walden [:Waldo] (remove +bmo to email) 2015-02-27 13:49:04 PST
Note that rather than repeatedly using localeCompare, it would be better to create an Intl.Collator instance and use it repeatedly, to save on work needed to set up collation resources.

Note You need to log in before you can comment on or make changes to this bug.