Closed (outdated)
Project:
cctags
Version:
6.x-1.5
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 May 2010 at 08:58 UTC
Updated:
13 Sep 2024 at 12:41 UTC
Jump to comment: Most recent
strnatcasecmp have bug with cyrillic characters and UTF-8 encoding. This module use next constraction for sort by title:
function _cctags_sort_by_title($a, $b) {
return strnatcasecmp($a->name, $b->name);
} Working constration is something like:
function _cctags_sort_by_title($a, $b) {
$namea = iconv('UTF-8', 'cp1251',$a->name);
$nameb = iconv('UTF-8', 'cp1251',$b->name);
$namea = cyr_strtolower($namea);
$nameb = cyr_strtolower($nameb);
return strnatcasecmp($namea, $nameb);
}
Comments
Comment #1
astonvictor commentedI'm closing it because the issue was created a long time ago without any further steps.
if you still need it then raise a new one.
thanks