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
     1.1 --- a/src/main/java/de/uapcore/lightpit/AbstractLightPITServlet.java	Thu Nov 19 13:58:54 2020 +0100
     1.2 +++ b/src/main/java/de/uapcore/lightpit/AbstractLightPITServlet.java	Wed Nov 25 11:13:02 2020 +0100
     1.3 @@ -405,6 +405,8 @@
     1.4      }
     1.5  
     1.6      private void doProcess(HttpMethod method, HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
     1.7 +        // the very first thing to do is to force UTF-8
     1.8 +        req.setCharacterEncoding("UTF-8");
     1.9  
    1.10          // choose the requested language as session language (if available) or fall back to english, otherwise
    1.11          HttpSession session = req.getSession();

mercurial