Readers deal with character data - while streams do not. Which is to say
that encoding (which is interpreting bytes) is not applicable to streams.

----- Original Message ----- 
From: "Antony Paul" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Monday, June 27, 2005 4:11 PM
Subject: Re: Use UTF-8 encoded proerties file


> On 6/27/05, Paul Moody <[EMAIL PROTECTED]> wrote:
> > This looks like the same problem discussed in the
> > "native2ascii" thread. I will copy in my input below,
> > you can search on the mailing list site for the
> > complete list of messages for this thread:
> >
> > **********
> >
> > Re: native2ascii
> >
> > Paul Moody
> > Fri, 24 Jun 2005 02:43:30 -0700
> >
> > Below is my understanding of the solution. It is a bit
> > annoying that property files can not be UTF-8 encoded
> > but that seems to be the case. Anyway, here is what I
> > have done and it seems to work...
> >
> >  - you should store your Turkish strings in a text
> > file with UTF-8 format (you can open the file in
> > notepad and when saving choose the UTF-8 format).
> >
> >  - you run the native2ascii to convert the UTF-8
> > strings into the required format with the strange
> > looking things like \ufffd (or whatever). Don't worry,
> > this is what is needed for the property files used by
> > struts.
> >
> >  - your JSPs should have a directive telling your
> > browser that they are in UTF-8 format. Near the top of
> > every JSP we have "<%@ page
> > contentType="text/html;charset=UTF-8"
> > pageEncoding="UTF-8" language="java" %>"
> >
> > Hopefully this should work. Good luck.
> >
> > **********
> >
>
> Thanks for the reply. I dont want to use native2ascii tool. I want to
> read properties file in Arabic so that it is easy to edit. When I
> looked at API for java.io.InputStreamReader, there is an option to
> pass the encoding but I cant find a similar mechanism with subclasses
> of InputStream.
>
> -- 
> rgds
> Antony Paul
> http://www.geocities.com/antonypaul24/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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

Reply via email to