Hello Friends,
I had a working modification for encoding problems (for Mac OS). It worked OK with previous (1.4) versions.
So far I have not managed to make it work properly with my 1.5 test site.
Here's the mod:
iptc.inc.php
The beginnig of the original file:
function strip_IPTC($data) {
if (is_array($data)) {
foreach ($data as $key=>$item) {
$data[$key]=strip_IPTC($item);
}
} else {
$data=htmlentities(strip_tags(trim($data,"\x7f..\xff\x0..\x1f")),ENT_QUOTES); //sanitize data against sql/html injection; trim any nongraphical non-ASCII character:
}
return $data;
}
and I replaced it with:
function strip_IPTC($data) {
if (is_array($data)) {
foreach ($data as $key=>$item) {
$data[$key]=strip_IPTC($item);
}
} else {
$data = htmlentities(strip_tags($data),ENT_QUOTES); // the trim function below removes some MacRoman chars if they are in the beginning/end of the string.
//$data=htmlentities(strip_tags(trim($data,"\x7f..\xff\x0..\x1f")),ENT_QUOTES); //sanitize data against sql/html injection; trim any nongraphical non-ASCII character:
// replace MacRoman chars
$data=ereg_replace(128, "Ä",$data);
$data=ereg_replace(138, "ä",$data);
$data=ereg_replace(133, "Ö",$data);
$data=ereg_replace(154, "ö",$data);
$data=ereg_replace(134, "Ü",$data);
$data=ereg_replace(159, "ü",$data);
$data=ereg_replace(205, "Õ",$data);
$data=ereg_replace(155, "õ",$data);
$data=ereg_replace(129, "Å",$data);
$data=ereg_replace(140, "å",$data);
$data=ereg_replace(175, "Ø",$data);
$data=ereg_replace(191, "ø",$data);
$data=ereg_replace(190, "æ",$data);
$data=ereg_replace(174, "Æ",$data);
$data=ereg_replace(169, "©",$data);
}
return $data;
}
In 1.5.12 version, the mod fixed special characters in keywords, but not in Title.
I would be happy to learn, how also the title encoding could be fixed.
Cheers Seppo