diff options
author | Ugnich Anton | 2014-01-28 22:11:52 +0700 |
---|---|---|
committer | Ugnich Anton | 2014-01-28 22:11:52 +0700 |
commit | 45bc7349af0696b9c68266feece63d7359260cec (patch) | |
tree | 9936534e57a52568566166f7e59a7519abe11a66 /src/java/com/juick/http/www/Main.java | |
parent | 36c8ec33c09fbfd0f82a5a4121ef63ed1ec77457 (diff) |
post setCharacterEncoding
Diffstat (limited to 'src/java/com/juick/http/www/Main.java')
-rw-r--r-- | src/java/com/juick/http/www/Main.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/java/com/juick/http/www/Main.java b/src/java/com/juick/http/www/Main.java index 59065341..47b94387 100644 --- a/src/java/com/juick/http/www/Main.java +++ b/src/java/com/juick/http/www/Main.java @@ -262,6 +262,10 @@ public class Main extends HttpServlet implements Stream.StreamListener { */ @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + if (request.getCharacterEncoding() == null) { + request.setCharacterEncoding("UTF-8"); + } + String uri = request.getRequestURI(); if (uri.equals("/post")) { pagesNewMessage.doPostNewMessage(sql, request, response); |