Bug 338808 - Incoherent sorting of text in tabular views
Summary: Incoherent sorting of text in tabular views
Status: CLOSED FIXED
Alias: None
Product: KEXI
Classification: Applications
Component: KexiDB (show other bugs)
Version: 2.8.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Michal Poteralski
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2014-09-04 16:20 UTC by robert leleu
Modified: 2014-09-20 21:17 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.8.6
Sentry Crash Report:


Attachments
identite.csv (180.64 KB, text/csv)
2014-09-11 10:30 UTC, robert leleu
Details
listeadresses.csv (352.87 KB, text/csv)
2014-09-11 10:30 UTC, robert leleu
Details
Set up database (89.73 KB, application/gzip)
2014-09-11 22:08 UTC, Michal Poteralski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description robert leleu 2014-09-04 16:20:45 UTC
in the table, sorted by clicking the header
'Étienne' is after 'Eysseric'

in a query, sorted by design 
'Étienne' is before 'Eysseric'

but if you click the header you have again 
'Étienne' is after 'Eysseric'

Reproducible: Always



Expected Results:  
be coherent, preferably 
'Étienne' before 'Eysseric'
Comment 1 Jarosław Staniek 2014-09-10 19:40:13 UTC
@Robert what database type? (.kexi file, mysql, postgresql, etc.)
Comment 2 robert leleu 2014-09-11 08:01:15 UTC
kexi file
Do you need my file ?


la 10/09/2014 21:40, Jarosław Staniek skribis (esperanto estas la unua 
internacia lingvo)
> https://bugs.kde.org/show_bug.cgi?id=338808
>
> --- Comment #1 from Jarosław Staniek <staniek@kde.org> ---
> @Robert what database type? (.kexi file, mysql, postgresql, etc.)
>
Comment 3 Jarosław Staniek 2014-09-11 08:14:15 UTC
@Robert Yes, would be useful. Even single table and query would be enough. Can be emailed privately if you want.
Comment 4 robert leleu 2014-09-11 10:30:23 UTC
Created attachment 88656 [details]
identite.csv

attached

table identite.csv
query listeadresses.csv

is the csv format adequate ?



la 11/09/2014 10:14, Jarosław Staniek skribis (esperanto estas la unua 
internacia lingvo)
> https://bugs.kde.org/show_bug.cgi?id=338808
>
> --- Comment #3 from Jarosław Staniek <staniek@kde.org> ---
> @Robert Yes, would be useful. Even single table and query would be enough. Can
> be emailed privately if you want.
>
Comment 5 robert leleu 2014-09-11 10:30:23 UTC
Created attachment 88657 [details]
listeadresses.csv
Comment 6 Jarosław Staniek 2014-09-11 10:37:22 UTC
Thanks. @Michal would check them.
Comment 7 Michal Poteralski 2014-09-11 19:48:53 UTC
Reproduced. 
Reproduction steps:
1. Open Database 
2. Chose External Data -> Import Data From File and import 'identite.csv' as a new table.
3. Create a new Query:
a) Create a new Query and insert  identite table. 
b) add 'nom' from  identite table to Query Columns
c) Set Ascending soritng
4. Chose Data tab

Expected: 
'Étienne' should be after Eysseric.

Actual Result:
'Étienne' is before Eysseric.

More Info:
If in Queries (data mode) 'nom' will be sorted by click header order is correct.
Comment 8 Jarosław Staniek 2014-09-11 21:06:39 UTC
@Michal if you recreated the .kexi file, could you please attach it here? Can be compressed.
Comment 9 Michal Poteralski 2014-09-11 22:08:42 UTC
Created attachment 88663 [details]
Set up database
Comment 10 Jarosław Staniek 2014-09-20 18:55:12 UTC
Git commit ff67c565be483530f6e9d3d5356b167db29b0b14 by Jaroslaw Staniek, on behalf of Michał Poteralski.
Committed on 20/09/2014 at 18:36.
Pushed by staniek into branch 'calligra/2.8'.

Fix text sorting in tabular views

Use ICU-based collator for sorting text, the same that is used by an SQLite
extension.
REVIEW:120274
FIXED-IN:2.8.6
DIGEST: Kexi now uses consistent sorting of unicode text values based on ICU.

M  +2    -1    libs/db/CMakeLists.txt
M  +47   -2    libs/db/tableviewdata.cpp
M  +1    -0    libs/db/tableviewdata.h

http://commits.kde.org/calligra/ff67c565be483530f6e9d3d5356b167db29b0b14
Comment 11 Jarosław Staniek 2014-09-20 19:01:57 UTC
Git commit 0e38a6dcdd07b260f9a126c0b65c8113a98dc290 by Jaroslaw Staniek, on behalf of Michał Poteralski.
Committed on 20/09/2014 at 18:36.
Pushed by staniek into branch 'master'.

Fix text sorting in tabular views

Use ICU-based collator for sorting text, the same that is used by an SQLite
extension.
REVIEW:120274
FIXED-IN:2.8.6

M  +2    -1    libs/db/CMakeLists.txt
M  +47   -2    libs/db/tableviewdata.cpp
M  +1    -0    libs/db/tableviewdata.h

http://commits.kde.org/calligra/0e38a6dcdd07b260f9a126c0b65c8113a98dc290