View Issue Details

IDProjectCategoryView StatusLast Update
837RackTablesdefaultpublic2019-01-08 11:48
Reporterblaza-pl Assigned Toandriyanov  
PrioritylowSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.20.4 
Target Version0.20.7Fixed in Version0.20.7 
Summary837: Bad sorting
DescriptionWhen names (Object, Location, Row) contain polish character "?" they are not propperly sorted.

The proper order would be:
...k l ? m n ...

Currently "?" is sorted at last position.
Steps To ReproduceAdd Locations:
Lublin
?ask
Katowice

This should be sorted as above but instead is:
Lublin
Katowice
?ask

Additional InformationThis may me mysql problem but I wasn't able to find a solution.
Maybe this problem affects other local characters also??
TagsNo tags attached.

Activities

infrastation

infrastation

2013-05-06 22:07

administrator   ~0001367

RackTables uses "CHARACTER SET utf8 COLLATE utf8_general_ci", which should produce correct results for most languages, given there are no configuration issues. Can you check that the MySQL server is properly configured for UTF-8?

mysql> status
[...]
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
[...]
Does MySQL store the special character properly? Does it return the data in correct sort order, when you query from a MySQL client?
infrastation

infrastation

2013-05-06 22:09

administrator   ~0001369

Does this issue reproduce on demo.racktables.org?
blaza-pl

blaza-pl

2013-05-07 09:11

reporter   ~0001371

I have reproduced creating some Locations on demo.racktables.org

mysql> status
[...]
Server characterset: latin1
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8


I have verfied and this is the same doing SELECT ... ORDER BY directly on mysql. This was fixed when I have added to the query "COLLATE utf8_unicode_ci" or "COLLATE utf8_polish_ci". So it seems mysql has problems with polish letters when utf8_general_ci is used. Any chance to set it in Racktables as a config option?
infrastation

infrastation

2013-05-07 09:32

administrator   ~0001373

> Server characterset: latin1

Does it work OK with the server configured for UTF-8 (see some hints in README)?
blaza-pl

blaza-pl

2013-05-07 13:36

reporter   ~0001375

I have changed tried it - but it did not help :/


mysql> status
--------------
mysql Ver 14.14 Distrib 5.1.66, for debian-linux-gnu (x86_64) using readline 6.1

Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
infrastation

infrastation

2013-05-07 13:58

administrator   ~0001377

http://dev.mysql.com/doc/refman/5.1/en/charset-unicode-sets.html

"For any Unicode character set, operations performed using the xxx_general_ci collation are faster than those for the xxx_unicode_ci collation. For example, comparisons for the utf8_general_ci collation are faster, but slightly less correct, than comparisons for utf8_unicode_ci."
infrastation

infrastation

2013-06-18 13:30

administrator   ~0001529

This issue will be resolved through changing the default collation. This requires some testing that I cannot immediately complete. The solution is likely to miss the next stable release.
infrastation

infrastation

2013-07-26 11:25

administrator   ~0001655

Blazej,

would you like to author a fix for this issue? The right approach would be not modifying SELECTs to use COLLATE, but changing the default COLLATE in the database (this seems to require the change on all tables and all columns as well). The changes would need to be made in install.php and upgrade.php.
acidix

acidix

2013-09-03 11:51

reporter   ~0001741

Pull request https://github.com/RackTables/racktables/pull/29 to introduce explicit collate option for all tables.
andriyanov

andriyanov

2014-02-10 15:33

reporter   ~0002183

Merged, thank you.

Issue History

Date Modified Username Field Change
2013-05-06 10:55 blaza-pl New Issue
2013-05-06 22:07 infrastation Note Added: 0001367
2013-05-06 22:07 infrastation Assigned To => infrastation
2013-05-06 22:07 infrastation Status new => assigned
2013-05-06 22:09 infrastation Note Added: 0001369
2013-05-07 09:11 blaza-pl Note Added: 0001371
2013-05-07 09:32 infrastation Note Added: 0001373
2013-05-07 13:36 blaza-pl Note Added: 0001375
2013-05-07 13:58 infrastation Note Added: 0001377
2013-05-07 13:58 infrastation Target Version => 0.20.5
2013-06-18 13:30 infrastation Note Added: 0001529
2013-06-18 13:30 infrastation Target Version 0.20.5 => 0.20.6
2013-07-26 11:25 infrastation Note Added: 0001655
2013-09-03 11:51 acidix Note Added: 0001741
2013-09-03 15:15 andriyanov Assigned To infrastation => andriyanov
2013-11-25 15:24 infrastation Target Version 0.20.6 => 0.20.7
2014-02-10 15:33 andriyanov Note Added: 0002183
2014-02-10 15:33 andriyanov Status assigned => closed
2014-02-10 15:33 andriyanov Resolution open => fixed
2014-02-10 15:33 andriyanov Fixed in Version => 0.20.7
2019-01-08 11:48 andriyanov Source_changeset_attached => RackTables master b4bc5582