]> source.dussan.org Git - gitblit.git/commitdiff
force encoding JSON response as UTF-8 14/head
authorfifthgnat <fifthgnat@gmail.com>
Thu, 26 Apr 2012 04:51:20 +0000 (12:51 +0800)
committerfifthgnat <fifthgnat@gmail.com>
Thu, 26 Apr 2012 04:51:20 +0000 (12:51 +0800)
src/com/gitblit/JsonServlet.java

index 5433a61c0f8b459f685d5b8e03266271db36a2f4..3ad2b7d2955b00fd3d910b000d2696929d1a2861 100644 (file)
@@ -122,6 +122,7 @@ public abstract class JsonServlet extends HttpServlet {
                if (o != null) {\r
                        // Send JSON response\r
                        String json = JsonUtils.toJsonString(o);\r
+                       response.setCharacterEncoding(Constants.ENCODING);\r
                        response.getWriter().append(json);\r
                }\r
        }\r