0

I have my validator which implements org.springframework.validation.Validator. When I use errors.rejectValue("myField", "myErrorcode") for some form if in my error code defined in language_it_IT.properties contains HTML entities like à, then it will display as à on html page not as à as I want. How I can achieve that?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • _... it will display as "à" on html page not as "à" as I want_ I can't see the difference. – il_raffa Dec 25 '15 at 08:31
  • Sorry it displays "& agrave" without space of course but I don't know how to insert it here without space – user5208306 Dec 25 '15 at 08:37
  • 2
    As to the concrete problem, special characters in properties files need to be escaped as unicode codepoints like so `\u00E0`, not as HTML entities. HTML entities is for HTML files only, not for properties files. Decent IDEs like Eclipse and IntelliJ do that automatically in their properties file editor. If you're using such an IDE, just put the `à` right away in the properties file instead of its HTML entity counterpart. See also a.o. http://stackoverflow.com/questions/4659929/how-to-use-utf-8-in-resource-properties-with-resourcebundle – BalusC Dec 25 '15 at 08:38
  • Thak you, I am using unicode codepoint and it is works. – user5208306 Dec 25 '15 at 10:08

0 Answers0