All data on the page is displayed correctly. Text retrieved from the database, including. But when sending the form, the text comes to windows-1252 to the controller.
In jsp encoding specified
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> Also indicated the encoding for the form itself.
<form:form method="POST" action="/event" modelAttribute="message" acceptCharset="UTF-8"> In the web.xml set filter
<filter> <filter-name>encoding-filter</filter-name> <filter-class> org.springframework.web.filter.CharacterEncodingFilter </filter-class> <init-param> <param-name>encoding</param-name> <param-value>UTF-8</param-value> </init-param> <init-param> <param-name>forceEncoding</param-name> <param-value>true</param-value> </init-param> </filter> <filter-mapping> <filter-name>encoding-filter</filter-name> <url-pattern>*</url-pattern> </filter-mapping> What could be the problem?