diff --git a/src/fpdm.php b/src/fpdm.php index a5e89ff..22ca793 100644 --- a/src/fpdm.php +++ b/src/fpdm.php @@ -1787,6 +1787,10 @@ function parsePDFEntries(&$lines){ if(($name=="")&&preg_match("/^\/T\s?\((.+)\)\s*$/",$this->_protectContentValues($CurLine),$match)) { $name=$this->_unprotectContentValues($match[1]); + //FIX: convert ASCII object names to utf-8 + // don't use utf8_encode($name) yet, it's core function since php 7.2 + $name = mb_convert_encoding($name, 'UTF-8', 'ASCII'); + //ENDFIX if($verbose_parsing) echo ("Object's name is '$name'"); $object["infos"]["name"]=$name; //Keep a track @@ -2116,4 +2120,4 @@ function Error($msg) { } -unset($__tmp); \ No newline at end of file +unset($__tmp);