$str = 'China';
if (preg_match("/^[x7f-xff]+$/", $str))
{ //Compatible with gb2312,utf-8
echo "zhongwen";
}
else
{
echo "yingwen ";
}
Author "Technical Life"
http://www.bkjia.com/PHPjc/478636.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/478636.htmlTechArticle$str = China; if (preg_match(/^[x7f-xff]+$/, $str)) { //Compatible with gb2312, utf-8 echo zhongwen; } else { echo yingwen ; } The author's technical life...