Christian,

You can create a properties file with display text in required language
itself like 

Newkey.label1 = Gracias
...
...

Save it to <somefile.txt> and then call native2ascii program in
<JAVA_HOME>/bin folder to convert the contents to appropriate Unicode
characters and save the file with appropriate properties file naming
convention. In the example, it will be <somefile_es.properties>.

You can also automate this file generation build script too. Hope this
helps.

~Muthu

-----Original Message-----
From: Charlesmel Carino [mailto:charlesmel1...@yahoo.com] 
Sent: Thursday, April 09, 2009 7:46 PM
To: Struts Users Mailing List
Cc: Rommel Garcia
Subject: Re: [s2] Using UTF-8 in .properties files

Hi Christian,

There are two sides of the story here. 

One is to type those UTF-8 characters onto your properties file (probably
several combination of key strokes) and make sure that file editor you are
using
is configured for encoding UTF-8.

The other is ensuring your code to read UTF-8 encoded files. If that is not
happening then your characters get funky.

Rommel



________________________________
From: Cristian Peraferrer <corellia...@gmail.com>
To: user@struts.apache.org
Sent: Thursday, April 9, 2009 5:28:29 AM
Subject: [s2] Using UTF-8 in .properties files

Hi,

How I can use UTF-8 in the .properties files? (I need the .properties files
for i18n, so loggically I will need characters other than the contained in
ASCII or latin1).

Thanks,
Cristian.

--GPG Key-ID: 0x564903FA - Jabber ID: corellian at swissjabber.ch


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to