by kim » Tue Apr 13, 2004 4:32 am
hello
I have installed pkp harvester in linux redhat 9.0 with php 4.2.0.
There is a bug, in the file xmlparser.inc.php .. . this bug is a very bad gestion of characters utf8 encoded....
*********
code existant
*********
if(!empty($data)) {
if(function_exists("html_entity_decode")) {
$data = str_replace("&", "&", str_replace("\0", "", htmlentities(html_entity_decode(htmlentities($data, ENT_COMPAT, 'UTF-8')))));
} else {
$data = str_replace("&", "&", utf8_decode(htmlentities(unhtmlentities($data))));
}
}
**********
le bon code :
**********
if(!empty($data)) {
if(function_exists("html_entity_decode")) {
$data = str_replace("&", "&", str_replace("\0", "", htmlentities(html_entity_decode(htmlentities($data, ENT_COMPAT, 'UTF-8')))));
} else {
$data = str_replace("&", "&",
htmlentities(utf8_decode(unhtmlentities($data))));
}
}
************
So I hope that can serve to other users...