Re: UTF-8 vs ISO-8859

2009-10-21 Thread Martin Strand
Also, JDK 6 added another load() method, so you can use properties.load(new InputStreamReader(in, utf8)) to load utf8 files. On Wed, 21 Oct 2009 10:35:22 +0200, Ulrich Stärk wrote: A bit of explanation: Normally, property files are expected to be ISO-8559-1 encoded [1]. When there are chara

Re: UTF-8 vs ISO-8859

2009-10-21 Thread Olle Hallin
We always use UTF-8. We usually add a mandatory comment that contains non-ASCII characters at the top of the file, and a unit test that verifies it. It's too common that some developer screws up the file by opening it with wrong encoding. Example: *.properties: # DO NOT REMOVE: r

Re: UTF-8 vs ISO-8859

2009-10-21 Thread Ulrich Stärk
Am 21.10.2009 10:02 schrieb Stephan Windmüller: Note: The issues I have is that eclipse keeps insisting that my .properties files are ISO-8859 and I have to manually switch encoding for each new property file i create or copy. Besides that's everyting works fine Forgot to mention: You c

Re: UTF-8 vs ISO-8859

2009-10-21 Thread Joakim Olsson
On Wed, 2009-10-21 at 10:02 +0200, Stephan Windmüller wrote: > Gunnar Eketrapp wrote: > > > Note: The issues I have is that eclipse keeps insisting that my .properties > > files are ISO-8859 and I have to manually switch encoding > > for each new property file i create or copy. Besides that's eve

Re: UTF-8 vs ISO-8859

2009-10-21 Thread Ulrich Stärk
A bit of explanation: Normally, property files are expected to be ISO-8559-1 encoded [1]. When there are characters that can't be represented using that character encoding, unicode escapes must be used. The native2ascii tool can convert property files from UTF-8 to ISO-8859-1. Tapestry does the

Re: UTF-8 vs ISO-8859

2009-10-21 Thread Martin Strand
ISO-8859 is only the default for java.util.Properties, not for Tapestry. http://java.sun.com/javase/6/docs/api/java/util/Properties.html#load(java.io.InputStream) You can configure Eclipse to use UTF-8 for *.properties if you go to Preferences --> General --> Content Types That way you don't hav

Re: UTF-8 vs ISO-8859

2009-10-21 Thread Gunnar Eketrapp
Ok and thanks for the answer! (I read the text on Stackoverflow btw ...) I will continue with utf-8 for prop files. 2009/10/21 Stephan Windmüller > Gunnar Eketrapp wrote: > > > What is the recommended encoding for text files within a T5 project. > > UTF-8 > > > I just read ... > > > > Pr

Re: UTF-8 vs ISO-8859

2009-10-21 Thread Stephan Windmüller
Gunnar Eketrapp wrote: > What is the recommended encoding for text files within a T5 project. UTF-8 > I just read ... > > Properties files are ISO-8859-1 by definition - see the docs for the > Properties > class. Where do y