PHP Classes

cyrillic problem Encoding

Recommend this page to a friend!

      PHP PDF to Text  >  All threads  >  cyrillic problem Encoding  >  (Un) Subscribe thread alerts  
Subject:cyrillic problem Encoding
Summary:I had a problem with encoding
Date:2018-01-15 13:31:55

  1. cyrillic problem Encoding   Reply   Report abuse  
Picture of Jo Jo - 2018-01-15 13:31:55
I had a problem with cyrillic PDF, so I want to share a solution.
It displayed something like this: Вашият филиал

The thing that worked for me is:

$text=$pdf -> Text;
$text = iconv("utf-8//TRANSLIT//IGNORE", "cp1252//TRANSLIT//IGNORE", $text);
$text = iconv("cp1251//TRANSLIT//IGNORE", "utf-8//TRANSLIT//IGNORE", $text);

Hope I save time on somebody having the same issue.