The solution for the sorting problem which I had in the SimpleBoard tab is shown below:
[code:1]
function unhtmlentities ($string, $quotes, $charset) {
if ((phpversion() < '5.0.0') && ((phpversion() < '4.3.0') || !((strncmp($charset,"ISO-8859",8)==0) || ereg("1251",$charset) || ereg("1252",$charset)))) {
// For 4.1.0 =< PHP < 4.3.0 use this function instead of html_entity_decode: also php < 5.0 does not support UTF-8 outputs !
$trans_tbl = get_html_translation_table (HTML_ENTITIES);
$trans_tbl = array_flip ($trans_tbl);
return strtr ($string, $trans_tbl);
} else {
return html_entity_decode ($string, $quotes, $charset);
}
}
[/code:1]
The charset I use is cp1257 but it is not supported by the html_entity_decode function, so I changed the check to ereg("1251",$charset) || ereg("1252",$charset) instead of ereg("125",$charset)
Post edited by: elesus, at: 2005/11/30 12:28