php - regexp cyrillic filename not matches -


i take list of files php glob(."*.pdf"). files have cyrillic names. example: ООО «Рога и копыта»

then load company names database , try find them in file names: preg_match("/$firm_name/ui", $file_name, $match);

i have problem: firms if $firm_name visually similar $file_name, preg_match says there no match.

mb_detect_encoding both variables return utf-8.

there problem in file name, or maybe there encoding or something, can not understand, ask help.

upd:

$file_name='ООО «Рога и копыта»'; preg_match("/... .Рога и копыта./ui", $file_name, $match); 

as result, ОО «Рога и копыта», 1 О missing


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -