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
Messages:1
Author:Jo
Date:2018-01-15 13:31:55
 

  1. cyrillic problem Encoding   Reply   Report abuse  
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);
print_r($text);


Hope I save time on somebody having the same issue.

 

For more information send a message to info at phpclasses dot org.