[Vtigercrm-developers] Substr function and unicode

????? ??????? denis0712 at mail.ru
Tue Mar 25 09:07:37 PDT 2008


Hi all!


I'm using vtiger CRM 5.0.4 with Russian language Pack.

I've noticed a bug in "\modules\Leads\ListViewTop.php" on line 115:

	$Top_Leads = (strlen($lead['leadname']) > 20) ?
(substr($lead['leadname'],0,20).'...') : $lead['leadname'];

Neither "substr" nor "strlen" work correct with Unicode chars.

I found a solution, to use mb_strlen and mb_substr. Is it suitable to use
this functions or there are some other suggestions how to fix it?






Best regards,
Denys Potapov




More information about the vtigercrm-developers mailing list