Announcement Announcement Module
Collapse
No announcement yet.
i18n encoding problem for japanese Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • i18n encoding problem for japanese

    Hello people,
    I am developing a web application using i18n. I am using JSTL for the view.The code is working fine for Roman scripts however there is problem with Japanese script.


    This is the code added in -servlet.xml::

    Code:
    <bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
     <property name="basename" value="/WEB-INF/classes/messages" />
        <property name="fileEncodings" value="UTF-8" />
        <property name="defaultEncoding" value="UTF-8" />   
    </bean>
    
    <!-- Declare the Interceptor -->
    <bean id="localeChangeInterceptor" class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor">
    <property name="paramName" value="siteLanguage"/>
    </bean>
    
    <!-- Declare the Resolver -->
    <bean id="localeResolver" class="org.springframework.web.servlet.i18n.SessionLocaleResolver"/>
    
    <!-- Add the Interceptor to handler mapping -->
    <bean id="urlMapping"
    class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
    <property name="interceptors">
    <list>
    <ref bean="localeChangeInterceptor"/>
    </list>
    </property>
    <property name="mappings">
    <props>
    <prop key="/log.htm">login</prop>
    </props>
    </property>
    </bean>
    Even with Japanese, it is displaying the static labels correctly, but the error messages generated on click action are being displayed in Unicode format.

    This is a part of messages_ja.properties file::

    Code:
    title=私の外国出願 
    forex:外国出願                                             
    heading=外国為替
    error.required=外国出願  
    error.invalidUserName=ユーザー名が存在します!
    I am really confused since it works fine for other scripts. Please help me on this.
Working...
X