On 9/21/05, Martin Kindler <[EMAIL PROTECTED]> wrote:
> I've got a problem with using non-ISO-8859 characters (they are UTF-8) in my
> Struts application.
> When I am using property-Strings in the resource bundle with cyrillic
> letters and use them they get mangled.
> They are mangled when I use the JSTL fmt:message tag as well as when I am
> importing them in my application and make the result available in some
> scope.
>
> I think my whole chain is configured to be UTF-8.
> At least the property-file as well as the .java-Files are UTF-8 encoded.
> Tomcat/Jasper are set to UTF-8, Struts is configured to use UTF-8 and also a
> filter is used to set the encoding to UTF-8.
>
> The browser detects my files as UTF-8.
>
> I made a little experiment delivering a tiny HTML-page with cyrillic
> characters thru my chain (using a simple forward in struts-config). This
> works. Then renaming the file to .jsp delivers mangled characters. I see
> that the Java-file produced from my JSP is already mangled. Jasper is
> configured with javaEncoding UTF8 (which is the default). I do not see any
> other configuration option applicable.
>
> What can I do?

If I am not mistaken, property files can be 8-bit only and supposed to
be ASCII or whatever standard western encoding. Check out MailReder
Demo App, for example this is "Cancel" in Russian:
button.cancel=\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c

If you don't want to recode your cyrillic strings into Unicode
yourself, try this applet:
http://javaboutique.internet.com/unicode/

Michael.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to