Skip to content

Commit

Permalink
fix to iconv() illegal character error (issue smalot#549)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stasky745 committed Feb 23, 2023
1 parent 70433d1 commit 6fba87b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Smalot/PdfParser/Font.php
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ private function decodeContentByEncodingElement(string $text, Element $encoding)
// so we use iconv() here
$iconvEncodingName = $this->getIconvEncodingNameOrNullByPdfEncodingName($pdfEncodingName);

return $iconvEncodingName ? iconv($iconvEncodingName, 'UTF-8', $text) : null;
return $iconvEncodingName ? iconv($iconvEncodingName, 'UTF-8//TRANSLIT//IGNORE', $text) : null;
}

/**
Expand Down

0 comments on commit 6fba87b

Please sign in to comment.