I've been trying to read non-English (Persian) parameters from a URL but as it gets it changes it to some non-sense characters . I can make sure that the side that is sending this paramer is not the problem . and I've also made the right collation in the MySQL database so that it actually stores them if it receives them properly. I'm running this on Tomcat Server as it was working fine on the local host. Here is what I used for pom.xml
:
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
And here's what its used for web.xml
:
<filter>
<filter-name>encodingFilter</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>
And also this one for the Tomcat server.xml
:
URIEncoding="UTF-8" useBodyEncodingForURI="true"
I've also tried to send the post request via UTF8 Charset added to the Header and didn't solve it.
Thanks for your help.