P.C.
P.C.

Reputation: 3749

How do I check if a string contains of at least one Chinese character?

How do I check if a string contains of at least one Chinese character?

Upvotes: 1

Views: 1402

Answers (1)

ajreal
ajreal

Reputation: 47321

try

mb_detect_encoding($str, "big5,gb2312");

potentially you need to use mb_detect_order to make it more precise

Upvotes: 4

Related Questions