From 45bc7349af0696b9c68266feece63d7359260cec Mon Sep 17 00:00:00 2001 From: Ugnich Anton Date: Tue, 28 Jan 2014 22:11:52 +0700 Subject: post setCharacterEncoding --- src/java/com/juick/http/www/Main.java | 4 ++++ src/java/com/juick/http/www/PM.java | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src/java/com') 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); diff --git a/src/java/com/juick/http/www/PM.java b/src/java/com/juick/http/www/PM.java index 5c0f67f9..5a07cd5a 100644 --- a/src/java/com/juick/http/www/PM.java +++ b/src/java/com/juick/http/www/PM.java @@ -151,7 +151,7 @@ public class PM { out.println("
"); -- cgit v1.2.3