Hi group,

I want to limit the number of characters that are shown in a script. The
characters happen to be Thai, and the page is encoded in UTF-8. Everything
works, except when I want to cut the text (just take start of string).

I do:

echo substr($thaistring, 0, 30);

The beginning of the string works fine, but the last character does mostly
"break". How can I determine the start and end of a character.

I hope the problem is clear enough, is it? :)

Best regards,
Peter Lauri

www.lauri.se - personal web site
www.dwsasia.com - company web site

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to