logo       

Substr function and unicode: msg#00036

web.vtigercrm.devel

Subject: Substr function and unicode

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

_______________________________________________
Reach hundreds of potential candidates - http://jobs.vtiger.com



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise