forces the use of utf-8 as request character encoding - fixes #108

Wed, 25 Nov 2020 11:13:02 +0100

author
Mike Becker <universe@uap-core.de>
date
Wed, 25 Nov 2020 11:13:02 +0100
changeset 160
e2d09cf3fb96
parent 159
86b5d8a1662f
child 161
3d9218457b62

forces the use of utf-8 as request character encoding - fixes #108

src/main/java/de/uapcore/lightpit/AbstractLightPITServlet.java file | annotate | diff | comparison | revisions
--- a/src/main/java/de/uapcore/lightpit/AbstractLightPITServlet.java	Thu Nov 19 13:58:54 2020 +0100
+++ b/src/main/java/de/uapcore/lightpit/AbstractLightPITServlet.java	Wed Nov 25 11:13:02 2020 +0100
@@ -405,6 +405,8 @@
     }
 
     private void doProcess(HttpMethod method, HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
+        // the very first thing to do is to force UTF-8
+        req.setCharacterEncoding("UTF-8");
 
         // choose the requested language as session language (if available) or fall back to english, otherwise
         HttpSession session = req.getSession();

mercurial