php - mb_stripos not working with accented characters -


i'm trying make mb_stripos work accented characters can't find way it.

$word = "leilao"; $text = "leilao leilões lllleeil"; $result = mb_stripos($text, $word); //works  $word = "leilão"; $text = "leilão leilões lllleeil"; $result = mb_stripos($text, $word); //doesn't works 

i checked mb_internal_encoding() , set utf-8

can me?

what need search in long text if array of keywords exists , return true. need accented character found aswell.

there way it?

thanks in advance!

[update]

i found problem. i'm trying text database,and set utf8.

//after query assign this: $text = $rows[0]["description"]; 

if use mb_detect_encoding result ascii encoding. , there no function change that! tried all, iconv, mb_convert_encode, utf8_encode, result ascii. , need match accented characters/words result 0.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -