Reply to breaking up an UTF8 string

Your name:

Reply:


Posted by Mathias K. on 07/19/07 16:15

Hello!

Could anyone give me a hint how to split up an utf8 string character-wise
with PHP?

In my case it's a Japanese string. As the lengths of each Japanese
character can differ from 2 to 6 bytes i don't know how to find out where
one character begins and the other ends.

I tried splitting it up with mb_split:

$departed = implode('<br>', mb_split("\w", $word));

Well it doesn't seem to work. The Japanese character totally get messed up.

Does anyone have a clue what regex to use or how else i could split a
Japanese string character wise?

Thanks in advance!


~ Mathias

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация