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

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -