mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 07:13:59 +01:00
Change iconv to mb_convert_encoding
This commit is contained in:
@@ -247,9 +247,7 @@ function toUTF8noBOM($string,$message=false) {
|
||||
// Test for any bad characters
|
||||
$teststring = $string;
|
||||
$teststringBroken = utf8_decode($teststring);
|
||||
$teststringConverted = function_exists("iconv")
|
||||
? iconv("UTF-8", "UTF-8//IGNORE", $teststringBroken)
|
||||
: $teststringBroken;
|
||||
$teststringConverted = mb_convert_encoding($teststringBroken, "UTF-8");
|
||||
// If we have a matching length, UTF8 encode it
|
||||
if (!$strictUTF8 && strlen($teststringConverted) == strlen($teststringBroken)) {
|
||||
$string = utf8_encode($string);
|
||||
|
||||
Reference in New Issue
Block a user