Can't sort numeric column with space as thousands separator
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
calibre |
Fix Released
|
Undecided
|
Charles Haley |
Bug Description
If you have a numeric custom column (i.e. a word count) that uses the "n" format specifier, which formats the number using the thousands separator specified in the system locale (typically a comma or a period), and the thousands separator is set to a space rather than a punctuation mark, calibre is unable to sort on that column.
I'm using calibre 0.8.59 on Windows 7 Professional x64. I'm using the US English version of Windows, but have customized my regional settings to match my admittedly quirky preferences. (Control Panel > Clock, Language and Region > Change the date, time, or number format > Additional settings... > Digit grouping symbol)
I have two word count columns in my database: "wordcount" is a simple integer that shows up in the edit metadata box, and "wordcount_display" is a "column built from other columns" with the template "{#wordcount:n}", set to be sorted/searched by number.
Related branches
- Kovid Goyal: Pending requested
-
Diff: 17 lines (+5/-2)1 file modifiedsrc/calibre/library/caches.py (+5/-2)
Changing the component for this bug.
assignee cbhaley
status triaged