0

Is the Hibernate Validator 4.2 is support UTF-8 ?
I configure the Hibernate Validation with Spring 3.0 and it work well with the English. But when change the locale to Korean, it displays weirdly: ë¹ë°ë²í¸ë ë¹ì ë ì ììµëë¤.
How to make the Hibernate Validator in Spring support UTF-8 ?

I already config in dispatcher servlet.xml :

<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
    <property name="basenames" >
        <list>
            <value>classpath:/architectgroup/udr/resources/lan</value>
            <value>classpath:ValidationMessages</value>
        </list>
    </property>

    <property name="defaultEncoding" value="UTF-8"/>
</bean>
tereško
  • 58,060
  • 25
  • 98
  • 150
TrangVu
  • 43
  • 7

1 Answers1

1

Probably nothing to do with Hibernate Validation. There's probably a place in your code or configuration where the wrong encoding is being used. Check that Korean characters display correctly in a normal page, and that validation messages display correctly on the console (e.g. in a unit test that loads your validation messages and triggers Hibernate validator)

artbristol
  • 32,010
  • 5
  • 70
  • 103