From 83896c05a2ff71ff7c8f2418f8d1eab5c1ed85c2 Mon Sep 17 00:00:00 2001 From: hwchen Date: Sun, 26 Mar 2017 02:10:45 +0800 Subject: [PATCH] changes to show chinese in summary field --- Mantis.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Mantis.php b/Mantis.php index 53f3970..932d922 100644 --- a/Mantis.php +++ b/Mantis.php @@ -312,6 +312,8 @@ function renderMantis( $input, $args, $mwParser ) return $errmsg; } + $db->set_charset("utf8"); + // create project array - accept only project names that exist in the database to prevent SQL injection // this check decreases performance a tiny bit, because we have to make another db call. but security comes first! if (!empty($tmpProjects)) @@ -630,6 +632,6 @@ function renderMantis( $input, $args, $mwParser ) $db->close(); //wfMessage("Test Message")->plain(); - return $mwParser->recursiveTagParse(utf8_encode($output)); + return $mwParser->recursiveTagParse($output); } ?>