使用克罗地亚语对数据进行排序时,排序结果不准确。 用英语对数据进行排序时不会发生此问题。 该问题产生了晶状的迹象:Š,Đ,Č,Ć,Ž。
//for example
$this->loadModel('BlogPosts');
$blogPosts = $this->BlogPosts->find('all')->order(['BlogPosts.title' => 'ASC'])->toArray();
pr($blogPosts);
排序结果是:
...[title] => Auris tristique vehicula urna idspe...
...[title] => Bauris rutrum dolor ligula sed euismod ante...
...[title] => Člass aptent taciti sociosqu ad litora torquent...
...[title] => Corbi imperdiet sollicitudin lacus ut bibe...
...[title] => Morbi a ipsum et lorem venenatis luctus...
...[title] => Pellentesque euismod ante nibh eu viverra...
...[title] => Rellentesque tortor dolor semper vitae elit et...
...[title] => Đonec semper orci nec egestas condime...
排序不正确。应该是:
...[title] => Auris tristique vehicula urna idspe...
...[title] => Bauris rutrum dolor ligula sed euismod ante...
...[title] => Corbi imperdiet sollicitudin lacus ut bibe...
...[title] => Člass aptent taciti sociosqu ad litora torquent...
...[title] => Đonec semper orci nec egestas condime...
...[title] => Morbi a ipsum et lorem venenatis luctus...
...[title] => Pellentesque euismod ante nibh eu viverra...
...[title] => Rellentesque tortor dolor semper vitae elit et...
克罗地亚语字母:A,B,C,Č,Ć,D,Dž,Đ,E,F,G,H,I,J,K,L,Lj,M,N,Nj,O,P, R,S,Š,T,U,V,Z,Ž
如何解决这个问题?