Hello again,
Have you read the PHP manual about substr() and the comments posted by other users?
http://www.php.net/manual/en/function.substr.php
A user there named 'ken at wisers dot com' suggests the following replacement function:
>function dbyte_substr($str, $start, $len=''){
if($len == ''){
$outstr = substr($str, $start);
}else{
$outstr = substr($str, $start, $len);
// Check the end bound is an double byte first byte or not
if(preg_match("/[\x80-\xFF]$/", $outstr)){
$outstr = substr("$outstr", 0, -1);
}
}
return $outstr;
}
I have never tried or tested this, so don't blame me if the server blows up or something like that!
BTW, what encoding are you using for Chinese?
My best,
Tim