Skip to content

Commit

Permalink
fix: deprecated function utf8_encode (#443)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rom1-B authored Dec 6, 2024
1 parent e82de58 commit 6987172
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion inc/backend.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public static function toUTF8($string)
{

if (!self::is_utf8($string)) {
return utf8_encode($string);
return Toolbox::encodeInUtf8($string);
}
return $string;
}
Expand Down
2 changes: 1 addition & 1 deletion inc/backendcsv.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public static function parseLine($fic, $data, $encoding = 1)
//If file is ISO8859-1 : encode the data in utf8
case PluginDatainjectionBackend::ENCODING_ISO8859_1:
if (!Toolbox::seems_utf8($tmp)) {
$csv[0][] = utf8_encode($tmp);
$csv[0][] = Toolbox::encodeInUtf8($tmp);
} else {
$csv[0][] = $tmp;
}
Expand Down

0 comments on commit 6987172

Please sign in to comment.