Can't sort numeric column with space as thousands separator

Bug #1021814 reported by Joe Busnengo
6
This bug affects 1 person
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

Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1021814

Changing the component for this bug.

 assignee cbhaley
 status triaged

Changed in calibre:
assignee: nobody → Charles Haley (cbhaley)
status: New → Triaged
Revision history for this message
Charles Haley (cbhaley) wrote :

Fix submitted.

The bug affected composite columns only. With this fix, if the value in the column is formatted according to the specifications in the locale then it will be correctly reconverted back to the number for sorting.

Changed in calibre:
status: Triaged → Fix Committed
Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in lp:calibre

Fixed in branch lp:calibre. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.