Und ich behaupte mal noch einer. Bei mir hat er gerade UTF-8 nach UTF-8, wobei natuerlich Muell rauskam.Boris wrote:Da war wieder ein/der Fehler im Code. 'utf-8)'
Hab dem Code ein weiteres strtolower spendiert1) Decoding String from UTF-8 to UTF-8
Code: Select all
function decode($string, $charset) {
echo $string;
if (strtolower($charset) == 'utf-8' && strtolower(LANG_CHARSET) != strtolower($charset)) {
echo '1) Decoding String from ' . $charset . ' to ' . LANG_CHARSET . "<br />\n";
return utf8_decode($string);
} elseif (strtolower(LANG_CHARSET) == 'utf-8' && strtolower($charset) != 'utf-8') {
echo '2) Decoding String from ' . $charset . ' to ' . LANG_CHARSET . "<br />\n";
return utf8_encode($string);
} else {
echo '3) Returning String from ' . $charset . ' to ' . LANG_CHARSET . "<br />\n";
return $string;
}
}