Maybe not a bug as such, because it looks like this function is not currently used by the Zen Cart core or any other code. I just happened to notice it when I was checking how Zen Cart handles encoding.
But this function (in includes/functions/functions_general.php)
Code:
function charsetClean($string) {
if (CHARSET == 'UTF-8') return $string;
if (function_exists('iconv')) $string = iconv("Windows-1252", CHARSET . "//IGNORE", $string);
$string = htmlentities($string, ENT_QUOTES, 'UTF-8');
$string = html_entity_decode($string, ENT_QUOTES, CHARSET);
return $string;
}
Won't work as intended because the default CHARSET setting in Zen Cart is defined in english.php as utf-8, not UTF-8. So the if (CHARSET == 'UTF-8') line will never be true (unless someone changes the CHARSET setting to UTF-8).
Not sure if this function will ever be used, or that it's just some legacy code or something.
Bookmarks