refer:http://www.wilf.cn/post/php-match-chinese-str.html
Since the advent of black hat SEO, dealing with SPAM (spam messages) has always been one of the tasks of website staff. What persecutes us is either spam message mass-sending machines or spam user registration machines.
Determining whether a string contains Chinese characters is one of the ways to deal with SPAM. It can effectively prevent pure English spam messages and can also be used to regulate user registration. Look at the code below, it is compatible with gb2312 and utf-8.
Attached, double-byte character encoding range
1. GBK (GB2312/GB18030)
x00-xff GBK double-byte encoding range
x20-x7f ASCII
xa1-xff Chinese gb2312
x80-xff Chinese gbk
2. UTF-8 (Unicode)
u4e00-u9fa5 (Chinese)
x3130-x318F (Korean
xAC00-xD7A3 (Korean)
u0800-u4e00 (Japanese)*/
The above introduces PHP to determine whether a string contains Chinese characters, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.