Skip to content

Commit

Permalink
refactor: replace deprecated utf8_encode with mb_convert_encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienbrault committed Feb 3, 2023
1 parent d09715c commit b443113
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Encoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function decode(string $text): array
{
$new_tokens = array();
$chars = array();
$token = utf8_encode($token);
$token = mb_convert_encoding($token, 'UTF-8', mb_list_encodings());
if(function_exists('mb_strlen'))
{
$len = mb_strlen($token, 'UTF-8');
Expand Down

0 comments on commit b443113

Please sign in to comment.