Skip to content

Commit 488cee6

Browse files
committed
Ensure PDF content are UTF8
It was the case for this pdf: http://a-eon.biz/PDF/News_Release_Developer.pdf
1 parent 23e0217 commit 488cee6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Graby.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ private function handleMimeAction($mimeInfo, $effective_url, $body = '')
471471
if ($mimeInfo['mime'] == 'application/pdf') {
472472
$parser = new PdfParser();
473473
$pdf = $parser->parseFile($effective_url);
474-
$infos['html'] = nl2br($pdf->getText());
474+
$infos['html'] = Encoding::toUTF8(nl2br($pdf->getText()));
475475

476476
// update title in case of details are present
477477
$details = $pdf->getDetails();

0 commit comments

Comments
 (0)