有这样的情况:
<?php
$string="Tu gdzieś jest ten ŁAŻĄCY po lesie troll";
//translatePL2EN($string)=="Somewhere here is the troll, who USUALLY WALKS through the forest."
$result = stripos($string,'łażący');
$result2 = mb_stripos($string,'łażący');
?>
我想找到不区分大小写的版本ŁAŻĄCY
-łażący
使用stripos();
或mb_stripos();
它应该返回 int(20),但它返回 false。
如何解决?
当使用特殊字符时,stripos 返回 false这仍然不能解决问题。
甚至这个
setlocale(LC_ALL, 'pl_PL', 'pl', 'Polish_Poland.28592');
$result = mb_stripos("ĘÓĄŚŁŻŹĆŃ",'ęóąśłżźćń');
返回假...