Michael Mealling wrote:

> On Mon, Feb 05, 2001 at 08:17:57PM +0900, Takashi Okamoto wrote:
> > From: "Michael Mealling" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Cc: <[EMAIL PROTECTED]>
> > Sent: Monday, February 05, 2001 7:54 PM
> > Subject: Re: serializing XML to a ServletOutputStream fails
> >
> > > P.S. I've also posted this problem to HotDispatch so if you
> > > can help me solve the problem you could get $50... ;-)
> >
> > >        response.setContentType("text/xml; charset=UTF-8");
> >
> > Could you try following code instead of this?
> >
> >        response.setContentType("text/xml; charset=8859_1");
>
> Sure. Same thing. It appears that I get the same output
> regardless of what I set the content type to...
>

That is because you are using an output stream, which is just a stream of
uninterpreted bytes from the viewpoint of the servlet container.  Setting the
content type with a character encoding, as described above, will affect the Writer
that is returned by response.getWriter() -- as long as you call setContentType()
first.

>
> -MM
>

Craig McClanahan



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

Reply via email to