[Vtigercrm-developers] Substr function and unicode
Prasad
prasad at vtiger.com
Tue Mar 25 23:17:38 PDT 2008
Hi Denys,
To use mb_strlen and mb_substr you need to enable mb_string php extension.
Also check out this library: http://phputf8.sourceforge.net/ which has
wrapper functions: http://phputf8.sourceforge.net/#String_Functions
If you work with this, kindly let us know your observations in more details.
Good luck.
Regards,
Prasad
On 3/25/08, ????? ??????? <denis0712 at mail.ru> wrote:
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20080326/5ac025d6/attachment-0003.html
More information about the vtigercrm-developers
mailing list