문제

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

Then I load the company names from the database and try to find them in the file names: preg_match("/$firm_name/ui", $file_name, $match);

I have a problem: for some firms even if $firm_name visually similar to $file_name, but preg_match says that there is no match.

mb_detect_encoding for both variables return UTF-8.

There is clearly a problem in the file name, or maybe there is a encoding or something, but I can not understand, ask your help.

UPD:

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

As a result, I get ОО «Рога и копыта», one О missing

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top