Results 1 to 3 of 3

Thread: i18n with special chars

  1. #1
    Join Date
    Jul 2010
    Posts
    2

    Default i18n with special chars

    Guys, I have read all existing threads (I believe so) about this topic and my problem still remains.

    My app already uses Spring resources (LocalChangeInterceptor and SessionLocaleResolver) to change languages. And it works perfectly for English and Portuguese.

    Now I need to include simplified chinese (like this 客).

    My header page (included in all pages) contains:
    <%@ page language="java" contentType="text/html;charset=UTF-8"%>

    Also, I changed the properties file's encoding type to UTF-8.

    Shouldnt these configs be enough?

    The only thing made it work was Native2Ascii tool. But I'd like to keep the original file instead of having the Unicode transformed one.

    Any suggestion is welcome.
    Tks.

  2. #2
    Join Date
    May 2005
    Posts
    288

    Default

    Property files are by definition encoded in ISO 8859-1 (http://download.oracle.com/docs/cd/E...roperties.html).
    One way to get around this, is to use ReloadableResourceBundleMessageSource, where you can set the default encoding. Be aware though, that your property files will only work with this particular implementation.

    HTH

  3. #3
    Join Date
    Jul 2010
    Posts
    2

    Default

    Quote Originally Posted by F.Degenaar View Post
    Property files are by definition encoded in ISO 8859-1 (http://download.oracle.com/docs/cd/E...roperties.html).
    One way to get around this, is to use ReloadableResourceBundleMessageSource, where you can set the default encoding. Be aware though, that your property files will only work with this particular implementation.

    HTH
    Perfect. Tks a lot.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •