Re: How to handle UTF-8 characters in struts ApplicationResources.properties
From: Oscar kind (oscar_at_danwa.net)
Date: 01/11/05
- Next message: Harish: "Re: dns and java"
- Previous message: ningjun.wang_at_lexisnexis.com: "Re: How to handle UTF-8 characters in struts ApplicationResources.properties"
- In reply to: ningjun.wang_at_lexisnexis.com: "How to handle UTF-8 characters in struts ApplicationResources.properties"
- Next in thread: Andrew Thompson: "Re: How to handle UTF-8 characters in struts ApplicationResources.properties"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 11 Jan 2005 19:37:32 +0100
ningjun.wang@lexisnexis.com wrote:
> I used WSAD5 and struts to develop a Japaness site using UTF-8. I
> defined error message in strut's ApplicationResources.properties file.
> If the error message contains Japaness characters (UTF-8 encoding), it
> will not be displayed correctly in the browser.
>
> For example ApplicationResources.properties contains the following:
>
> error.login.invalidCredential=?????: Your userName/password
> is invalid. Please try again.
Please note that a .properties file use the ISO 8859-1 character encoding,
so using UTF-8 characters in those files is not supported. See the
javadocs for java.util.RecourceBundle, java.util.PropertyResourceBundle
and java.util.Properties; especially this part:
http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding
BTW, struts uses java.util.Properies directly.
-- Oscar Kind http://home.hccnet.nl/okind/ Software Developer for contact information, see website PGP Key fingerprint: 91F3 6C72 F465 5E98 C246 61D9 2C32 8E24 097B B4E2
- Next message: Harish: "Re: dns and java"
- Previous message: ningjun.wang_at_lexisnexis.com: "Re: How to handle UTF-8 characters in struts ApplicationResources.properties"
- In reply to: ningjun.wang_at_lexisnexis.com: "How to handle UTF-8 characters in struts ApplicationResources.properties"
- Next in thread: Andrew Thompson: "Re: How to handle UTF-8 characters in struts ApplicationResources.properties"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|