How do I configure SpringMVC's annotation messages encoding? For example, I annotated a field of the form to be validated like this:
@NotEmpty(message = "ъ")
But when the error occurs, it is encoded in a wrong charset. Encoding filter in web.xml is enabled and *.java files are UTF-8. Tomcat's Connector in server.xml is configured to deal with UTF-8.
If you know the original charset, you can try to convert the original string to UTF. For example:
Actually, I've been using this same method (without changes) on the back-end even regardless the encoding on the front-end and it has been working fine. However, I didn't make a systematic test for all encoding types.
I hope it helps.