Skip to content

Commit 6987172

Browse files
authored
fix: deprecated function utf8_encode (#443)
1 parent e82de58 commit 6987172

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

inc/backend.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public static function toUTF8($string)
105105
{
106106

107107
if (!self::is_utf8($string)) {
108-
return utf8_encode($string);
108+
return Toolbox::encodeInUtf8($string);
109109
}
110110
return $string;
111111
}

inc/backendcsv.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public static function parseLine($fic, $data, $encoding = 1)
104104
//If file is ISO8859-1 : encode the data in utf8
105105
case PluginDatainjectionBackend::ENCODING_ISO8859_1:
106106
if (!Toolbox::seems_utf8($tmp)) {
107-
$csv[0][] = utf8_encode($tmp);
107+
$csv[0][] = Toolbox::encodeInUtf8($tmp);
108108
} else {
109109
$csv[0][] = $tmp;
110110
}

0 commit comments

Comments
 (0)