From: fifthgnat Date: Thu, 26 Apr 2012 04:51:20 +0000 (+0800) Subject: force encoding JSON response as UTF-8 X-Git-Tag: v1.0.0~60^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F14%2Fhead;p=gitblit.git force encoding JSON response as UTF-8 --- diff --git a/src/com/gitblit/JsonServlet.java b/src/com/gitblit/JsonServlet.java index 5433a61c..3ad2b7d2 100644 --- a/src/com/gitblit/JsonServlet.java +++ b/src/com/gitblit/JsonServlet.java @@ -122,6 +122,7 @@ public abstract class JsonServlet extends HttpServlet { if (o != null) { // Send JSON response String json = JsonUtils.toJsonString(o); + response.setCharacterEncoding(Constants.ENCODING); response.getWriter().append(json); } }