Struts....I18N and encoding?

E

eeyimaya

Hi,

In my application I have 2 resource files:
ApplicationResources.properties(for english) and
ApplicationResources_tr.properties(for Turkish). All the titles,
labels are read from these resources. But when I change the language
of the Internet Explorer(Options-->languages) to Turkish(tr), Turkish
characters are not shown. Everything is well when the language is
English(en-us).

I did not set the encoding in pages(jsps, htmls) by using for example
<%@ page contentType="text/html;charset=ISO-8859-9"%> because Struts
choose resource file from Locale and I think it must set the encoding
too, but does not. !!!

How can I solve the encoding for my struts application?
 
W

writeOnceDebugEverywhere()

- try to play with native2ascii.exe For example:

1.open you properties file with notepad.exe, write your key values (but
just values) with the appropriate language, and save him (Save as...)
with UTF-8 encoding as ordinary .txt file, for example labels_utf8.txt

2. call
native2ascii -encoding UTF8 labels_utf8.txt labels_sr_YU.properties

also, you must add the folloving line into the .jsp page:

<%@ page contentType="text/html;charset=UTF-8" %>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,982
Messages
2,570,189
Members
46,735
Latest member
HikmatRamazanov

Latest Threads

Top