----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

You are right...... my code is from days where this didn't work (an old
JRun to be more psecific)


Stefanos

Pawel Pesz wrote:

> ----------------------------------------------------------------
> BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
> WHEN YOU POST, include all relevant version numbers, log files,
> and configuration files.  Don't make us guess your problem!!!
> ----------------------------------------------------------------
>
> "Stefanos Karasavvidis" <[EMAIL PROTECTED]> wrote:
> > I've encounterer this problem several times......
> >
> > there are 2 parts of the problem you have to solve
> > [...]
> > 2) how to write correctly data back to the user.
> > [...]
> > the second problem has to do with the object you use to
> > write data back to the user.... if you use a PrintWriter
> > you have the problem that the printwriter uses internally
> > an OutputStreamWriter which is constructed with default
> > charset... [...]
>
> This statement is untrue (and you can easily verify this
> by looking at the code). All you have to do is set the
> character encoding in the "Content-Type" header before
> calling ServletResponse.getWriter():
>
>   response.setContentType("text/html; charset=<charset>");
>   PrintWriter out = response.getWriter();
>   out.println(<whatever>);
>
> JServ actually extracts the charset and constructs an
> appropriate PrintWriter.
>
> Best regards.
>
> --
> Pawel Pesz
> InsERT.net, Wroclaw, Poland
> mailto:[EMAIL PROTECTED]
> http://www.insert.net.pl
>
> --
> --------------------------------------------------------------
> Please read the FAQ! <http://java.apache.org/faq/>
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Archives and Other:  <http://java.apache.org/main/mail.html>
> Problems?:           [EMAIL PROTECTED]

--
======================================================================
Stefanos Karasavvidis
Electronics & Computer Engineer
e-mail : [EMAIL PROTECTED]

Multimedia Systems Center S.A.
Kissamou 178
73100 Chania - Crete - Hellas
http://www.multimedia-sa.gr

Tel : +30 821 88447
Fax : +30 821 88427




--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to