odtphp encoding error with PHP 5.4 -
one of clients using library odtphp, since upgrade php 5.2.8 php 5.4.14 there 1 issue segments containing extended characters (example : é à ô, etc).
there no information compatibility on wiki
after searching directly inside library, i've been able find how fix encoding problems replacing these lines :
odf.php:85
$value = $encode ? htmlspecialchars($value) : $value;
with
$value = $encode ? htmlspecialchars($value,ent_compat | ent_html401,"iso-8859-1") : $value;
odf.php:214
if (preg_match($reg, html_entity_decode($this->contentxml), $m) == 0) {
with
if (preg_match($reg, html_entity_decode($this->contentxml,ent_compat | ent_html401,"iso-8859-1"), $m) == 0) {
segment.php:141
$value = $encode ? htmlspecialchars($value) : $value;
with
$value = $encode ? htmlspecialchars($value,ent_compat | ent_html401,"iso-8859-1") : $value;
hope someone!
Comments
Post a Comment