From 4b5a5b4d85a6ebfc89c893e827ee9788a95521f1 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Fri, 19 Jun 2009 09:51:40 +0000 Subject: [PATCH] encode string to utf8 before converting to xml --- includes/DjVuImage.php | 1 + 1 file changed, 1 insertion(+) 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"; -- 2.20.1