- attached sort_test.csv
Wrong sorting order
Enclosed please find the results of sorting an index with the invocation LANG=pl_PL.UTF-8 djview4poliqarp
.
Comments (16)
-
reporter -
repo owner - changed status to open
-
repo owner Which Qt version is this? It works correctly on Mac.
Does removing spaces from the entries fix the problem?
-
reporter - attached Alphabetic_letter_by_letter1.png
-
reporter - attached a_sort-test.csv
A real life example
-
reporter Qt5 I guess. From compilation log:
[...] -lQt5OpenGL -lQt5Widgets -lQt5Gui -lQt5Network -lQt5Xml -lQt5Core
Which spaces do you mean?
-
repo owner I mean removing spaces from original sort_test.csv.
To check Qt version, please try
dpkg -l | grep qt5-default
-
reporter qt5-default:amd64 5.11.1+dfsg-6
Spaces in the sample index are needed for testing word by word order, but removing them changes nothing.
-
repo owner Is word by word working properly? What about a tergo?
-
repo owner Also, does command-line sort works correctly?
-
reporter No, always some default locale (English?) is used.
The problem seem to be related to the prefix LANG=pl_PL.UTF-8. It used to work, but now has no effect also for other tested program. Any idea how to provide a specific locale without changing the global setting of the system?
-
repo owner Can you try LC_ALL and LANGUAGE instead of LANG? Also, you can run
locale -a
to check if your preferred locale is available. -
reporter LANG=pl_PL.UTF-8 sort sort_test1.csv
works correctly, so my previous tests were unreliable.LANGUAGE seems to be OK, LC_ALL not.
I will make later more tests on real data, perhaps LANGUAGE is the solution.
-
repo owner Sorting of index is done by Qt which should use low-level OS functions on each OS, so there is not much I can do about it.
-
reporter - changed status to resolved
I found no problems with LANGUAGE.
-
reporter Just for the future, perhaps you can write to log or display somewhere the locale used.
- Log in to comment
Index used in the example.