OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Bug in PKP harvest for OS linux with php 4.2.2

Open Harvester Systems support questions and answers, bug reports, and development issues.

Moderators: jmacgreg, michael, John

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

Bug in PKP harvest for OS linux with php 4.2.2

Postby 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...
kim
 
Posts: 5
Joined: Tue Apr 13, 2004 4:22 am

Postby kevin » Tue Apr 13, 2004 10:33 am

Thanks for the bug fix.
kevin
 
Posts: 338
Joined: Tue Oct 14, 2003 8:23 pm


Return to Open Harvester Systems Support and Development

Who is online

Users browsing this forum: No registered users and 0 guests