Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要检查一个字符串是否符合代码页 1250。
我可以将它写入 MySQL 并进行如下检查:
select id,name from test where name <> CONVERT(name USING cp1250);
这将找到不合规的字符串。
我可以以某种方式在 PHP 中做同样的事情吗?
尝试这个。
mb_convert_case($name, MB_CASE_LOWER, "Windows-1251")
或者可能
mb_convert_encoding($name,"Windows-1251")