Skip to content

Commit

Permalink
Removed deprecated utf8_encode calls
Browse files Browse the repository at this point in the history
  • Loading branch information
ruff committed Jan 13, 2023
1 parent fb78024 commit 2055c6d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/OrderPdfWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public function attach($file, $name = '', $desc = '', $relationship = 'Unspecifi
}

if (!$isUTF8) {
$desc = utf8_encode($desc);
$desc = mb_convert_encoding($desc, 'UTF-8', mb_list_encodings());
}

if ('' == $mimetype) {
Expand Down Expand Up @@ -213,7 +213,7 @@ protected function putFileSpecification(array $file_info): void
$this->_put('<<');
$this->_put('/F (' . $this->_escape($file_info['name']) . ')');
$this->_put('/Type /Filespec');
$this->_put('/UF ' . $this->_textstring(utf8_encode($file_info['name'])));
$this->_put('/UF ' . $this->_textstring(mb_convert_encoding($file_info['name'], 'UTF-8', mb_list_encodings())));
if ($file_info['relationship']) {
$this->_put('/AFRelationship /' . $file_info['relationship']);
}
Expand Down

0 comments on commit 2055c6d

Please sign in to comment.