Yes, for some reason the Properties class assumes your
files are ISO 8859-1 encoded and struts uses the
Properties class to read your property files. I think
you have a couple of choices.

Either use the native2ascii which as somebody else
pointed out can be part of the build script. We use
something like this in ant:

<target name="convertPropertyFiles">
  <native2ascii encoding="UTF-8"
    src="${web.web.dir}/resourceBundles"
    dest="${web.build.dir}"
    includes="*.properties"
    excludes="*.class" >
  </native2ascii>
</target>

If you still do not want anything to do with
native2ascii then you could implement your own
MessageResources class that loads your UTF-8
properties files. See
"org.apache.struts.util.MessageResources" and
"org.apache.struts.util.MessageResourcesFactory".
Maybe somebody has already done this?

Hope this is of help.

Paul Moody

--- delbd <[EMAIL PROTECTED]> wrote:

> Quote from sun java doc of java.util.Properties:
> 
> 'When saving properties to a stream or loading them
> from a stream, the ISO 8859-1 character encoding is
> used. 
> For characters that cannot be directly represented
> in this encoding, Unicode escapes are used; 
> however, 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.'
> 
> 
> Le Lundi 27 Juin 2005 15:20, Antony Paul a écrit :
> > On 6/27/05, Jana Parvanova <[EMAIL PROTECTED]> wrote:
> > > Readers deal with character data - while streams
> do not. Which is to say
> > > that encoding (which is interpreting bytes) is
> not applicable to streams.
> > 
> > Then what the hell InputStream has to do with
> properties file ?. Do
> > people store properties file as in binary file ?.
> > 
> > 
> 
> -- 
> David Delbecq
> Royal Meteorological Institute of Belgium
> 
> -
> Is there life after /sbin/halt -p?
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



        
        
                
___________________________________________________________ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail 
http://uk.messenger.yahoo.com

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

Reply via email to