cut_str (string, intercept length, start length, encoding) is reloaded from http://www.jb51.net/article/4999.htm
[code].lt; php
/*
Utf-8 and GB2312;
the default is utf-8
the default = 0 $code ='UTF-8')
{
if ($code = ='UTF-8')
{
$pa =.quot; #91; \xf1-\xf7.#93;.#91; \x80-\xbf.#93;.#91; \x80-\xbf.#93;.#91; \x80-\xbf.#93; /.quot;
preg_match_all. CE ($t_string.#91; 0.#93; $start, $sublen));
}
else
{
$start = $start*2; ($i, 1)).Gt; 129)
{
$tmpstr.= substr ($string, $i, 2);
}
else
{
;.Gt; [/code]