tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anton Tagunov <atagu...@mail.cnt.ru>
Subject Re: Charset encoding issue
Date Sat, 06 Sep 2003 09:26:25 GMT
Hello Lima!

lccb> I have a jsp page with some form fields. I don't know how is the right way
lccb> to set the charset (because we're using portuguese characters). This is
lccb> the only configuration that have worked for me :

lccb> <%@ page contentType="html/text; charset=UTF-8"%>

To the best of my knowledge w3c standards do not prescribe
the browser what charset to encode form fields with.
In practice however this is generally the same charset
that the page containing form is in. So yes, if you want
the form data to be encoded with charset XXX you need your
page to have content type with charset XXX. And this is
what this <%@page%> directive is doing. (In a servlet you
would do response.setContentType()).

I have written an elaborate essay on this, it should
still be available at http://tagunov.tripod.com

lccb> <form (...) enctype="multipart/form-data">
As far as I know enctype here is not required.

lccb> Is it right ? Is there other way ?
Hope this mail and my old essay have answered at least
part of your questions.

WBR, Anton


Mime
View raw message