From: ThomasV Date: Fri, 19 Jun 2009 09:51:40 +0000 (+0000) Subject: encode string to utf8 before converting to xml X-Git-Tag: 1.31.0-rc.0~41291 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=4b5a5b4d85a6ebfc89c893e827ee9788a95521f1;p=lhc%2Fweb%2Fwiklou.git encode string to utf8 before converting to xml --- diff --git a/includes/DjVuImage.php b/includes/DjVuImage.php index 406878d076..1b8c4e4c10 100644 --- a/includes/DjVuImage.php +++ b/includes/DjVuImage.php @@ -250,6 +250,7 @@ class DjVuImage { $txt = wfShellExec( $cmd, $retval ); wfProfileOut( 'djvutxt' ); if( $retval == 0) { + $txt = utf8_encode($txt); $txt = htmlspecialchars($txt); $txt = preg_replace( "/\((page\s[\d-]*\s[\d-]*\s[\d-]*\s[\d-]*\s*\"([^<]*?)\"\s*|)\)/s", "", $txt ); $txt = "\n\n\n" . $txt . "\n\n";