Start arrow Forum
 
Polska wersjaEnglish version
 
Fun with Joomla!  


mtk
User

Senior Boarder
Posts: 17
graphgraph
Karma: 0  
substr & UTF8 - 2006/12/06 01:27 Hi,
if you want to keep your component UTF compatible, replace the substr funtion with this one:
Code:

  <?php function utf8_substr($str,$from,$len){ # utf8 substr # www.yeap.lv   return preg_replace('#^(?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,'.$from.'}'.                        '((?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,'.$len.'}).*#s',                        '$1',$str); } ?>


http://il2.php.net/manual/en/function.substr.php#57899
MtK - Smart Internet Solutions
Gan Pooh-A-Dov | Gan Maayan
Software Engineering | Date Cafe
  | | | The administrator has disabled public write access.
radek
Moderator

Moderator
Posts: 62
graph
Karma: 2  
Odp:substr & UTF8 - 2006/12/10 14:43 MTK,
Thank You for Your all sugestions and solutions!
On next version will be included.

Regards, Radek.
  | | | The administrator has disabled public write access.
 

Lost Password?? No account yet? Register

Forum Info
Our users have posted a total of 362 articles.
We have 956 registered users.
The newest registered user is: a_ng78
In total there are 42 users online: 42 guests and 0 registered
Registered Users online: none