Answer the question
In order to leave comments, you need to log in
Does not write to the database and does not display Cyrillic on the pages. How to convert everything to UTF-8?
My whole project is in Spring. In general, it does not want to write Russian letters into the database (MySQL) (the problem is in classes and methods) and display Russian text on the pages. How to fix?
P,S, Maven is set to UTF-8.
Answer the question
In order to leave comments, you need to log in
Try to put on the form (enctype="multipart/form-data")
or
Add to the method responsible for sending: produces = "text/plain;charset=UTF-8";
Example:
@RequestMapping(value = "/demo/send-text", produces = "text/plain;charset=UTF-8")
If the application is running on Tomcat, add the URIEncoding="UTF-8" attribute to the Connector tag in server.xml. It should turn out something like this:
<Connector port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol"
connectionTimeout="20000"
redirectPort="8443" URIEncoding="UTF-8"/>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question