maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Scheffler <thomas.scheff...@uni-jena.de>
Subject Re: Converting .properties to UTF8
Date Mon, 20 Jul 2009 18:51:16 GMT
Am Montag, 20. Juli 2009 19:43:14 schrieb daniel.green:
> Upon the packaging of my war, I want to convert all .properties files to
> utf8. Can I do this with straight maven or will I need to run an ant task
> OR write my own plugin?

If your .properties files should be read by the java.util.Properties class 
please keep in mind that they HAVE to be encoded in "ISO 8859-1" a.k.a. 
"latin1".

see http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html

"The load and store methods load and store properties in a simple line-
oriented format specified below. This format uses the ISO 8859-1 character 
encoding. Characters that cannot be directly represented in this encoding can 
be written using Unicode escapes  ; only a single 'u' character is allowed in 
an escape sequence. The native2ascii tool can be used to convert property files 
to and from other character encodings."

regards

Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message