Skip to content

Commit 0d6e4b3

Browse files
committed
refactor: replace deprecated utf8_encode with mb_convert_encoding
1 parent b2044ae commit 0d6e4b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Encoder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function encode(string $text): array
8787
{
8888
$new_tokens = array();
8989
$chars = array();
90-
$token = utf8_encode($token);
90+
$token = mb_convert_encoding($token, 'UTF-8', mb_list_encodings());
9191
if(function_exists('mb_strlen'))
9292
{
9393
$len = mb_strlen($token, 'UTF-8');

0 commit comments

Comments
 (0)