diff --git a/ChangeLog b/ChangeLog index 90ca2bfc1a2..6541c0b382e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -30,6 +30,7 @@ For users: - Fix: Project PDF document show the tasks. - Fix: bug #29278 : SMTP fails with IP - Fix: Default language on login page. +- Fix: Complete support of euros sign (even in PDF). For developers: - More comments in code. diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index ec7a165e7f7..17ab5586d6e 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -507,7 +507,7 @@ class Translate { function convToOutputCharset($str,$pagecodefrom='UTF-8') { if ($pagecodefrom == 'ISO-8859-1' && $this->charset_output == 'UTF-8') $str=utf8_encode($str); - if ($pagecodefrom == 'UTF-8' && $this->charset_output == 'ISO-8859-1') $str=utf8_decode($str); + if ($pagecodefrom == 'UTF-8' && $this->charset_output == 'ISO-8859-1') $str=utf8_decode(str_replace('€',chr(128),$str)); return $str; } diff --git a/htdocs/lib/pdf.lib.php b/htdocs/lib/pdf.lib.php index 963180e239e..9713a498f83 100644 --- a/htdocs/lib/pdf.lib.php +++ b/htdocs/lib/pdf.lib.php @@ -192,8 +192,7 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass '__FROM_EMAIL__' => $fromcompany->email, '__TOTAL_TTC__' => $object->total_ttc, '__TOTAL_HT__' => $object->total_ht, - '__TOTAL_VAT__' => $object->total_vat, - '€' => chr(128) + '__TOTAL_VAT__' => $object->total_vat ); $newfreetext=make_substitutions($conf->global->$paramfreetext,$substitutionarray,$outputlangs,$object);