1. Use u as one of your modifiers to the pattern.
For example, I would like to match a word "中" in a string, I should do this:
$str = "数据库中介";
$flag = preg_match("/中/u", $str);
In the above regular expression pattern, the little u is the modifier for notifying PHP engine to match the pattern in UTF-8 fashion.
For more information about modifiers, you may refer to the official documentation: PHP: Possible modifiers in regex patterns - Manual
2. Save your PHP scripts as UTF-8 encoded files.
If your files are encoded in MS950, I'm sorry, they can't work well. You have to change the encoding into UTF-8 then save.
You may refer to this following post for further guidance about change text encoding. How to Change File Encoding in Eclipse.