Replace deprecated utf8_encode function

This commit is contained in:
itismadness
2023-10-12 23:59:53 +00:00
parent 42f5170482
commit ea558fc679
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -15,7 +15,8 @@
}
},
"require": {
"php": ">=7.2"
"php": ">=7.2",
"ext-mbstring": "*"
},
"require-dev": {
"phpunit/phpunit": "^8",
+1 -1
View File
@@ -45,7 +45,7 @@ class BencodeTorrent extends Bencode
private function setDelim(): void
{
if (self::$utf8_filelist_delim === null) {
self::$utf8_filelist_delim = utf8_encode(chr(self::FILELIST_DELIM));
self::$utf8_filelist_delim = mb_convert_encoding(chr(self::FILELIST_DELIM), 'UTF-8', 'ISO-8859-1');
}
}