Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 30654 invoked from network); 8 Feb 2002 12:18:29 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 8 Feb 2002 12:18:29 -0000 Received: (qmail 12659 invoked by uid 97); 8 Feb 2002 12:18:15 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@jakarta.apache.org Received: (qmail 12595 invoked by uid 97); 8 Feb 2002 12:18:14 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 12584 invoked from network); 8 Feb 2002 12:18:14 -0000 Sender: jfclere@vtxrm2.bcn.fsc.net Message-ID: <3C63C2BC.15DE5C42@fujitsu-siemens.com> Date: Fri, 08 Feb 2002 13:21:16 +0100 From: jean-frederic clere Reply-To: jfrederic.clere@fujitsu-siemens.com X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.7 i686) X-Accept-Language: en, fr, de MIME-Version: 1.0 To: Tomcat Developers List Subject: Re: pageEncoding and Jasper References: <20020208.122651.122595843.yoko@netpotlet.com> <20020207195614.K90762-100000@icarus.apache.org> <20020208.172742.85389669.yoko@netpotlet.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N yoko@netpotlet.com wrote: > > From: "Craig R. McClanahan" > Subject: Re: pageEncoding and Jasper > Date: Thu, 7 Feb 2002 20:02:00 -0800 (PST) > Message-ID: <20020207195614.K90762-100000@icarus.apache.org> > > > > > If "it" is the pageEncoding attribute of the <%@ page %> directive, then > > > > the answer is yes. > > > > > > Craig, the answer is "no". > > > > Well, that's not the answer given by the JSP Specification ;-). > > At this point, I agree with you. So, I should say "partially no". > There are 2 phases from .jsp to .class, the first one is from > .jsp to .java, and the second is from .java to .class. The pageEncoding > attribute is applied to the first phase only as the JSP Specification > stated, and for the second phase, container applies UTF-8 only. > > > In the JSP 1.2 spec, see section 2.10.1, Table JSP.2-1, bottom of page 52, > > where the "pageEncoding" attribute is defined: > > > > Defines the character encoding of the JSP page. > > I've read this, and I knew the role of the pageEncoding attribute. > Though it is convenient that .java is written by UTF-8 because .java > file becomes completely readable, On a EBCDIC platfrom it is not very easy to read UTF-8 or ASCII ;-)) > I believe that the unicode escape is > more natural in Java. Besides, container doesen't need any encoding > information from .java to .jsp if non-ascii characters are converted > to the unocde escape. Why the JSP Specification doesn't mention about > UTF-8 is used internally. Is this a Tomcat specific technique ? > > > If you want to tell the container what character encoding to send on a > > response, use the "contentType" attribute of the <%@ page %> directive: > > > > <%@ page contentType="text/html;charset=UTF-8" %> > > I appreciate this function. The appropriate encoding management is that > every encodings in every phases including an input/output stream should > be controllable. > And now, JSP pages became to be a platform independant document. If JSP are like source files they could be in the machine default encoding. > > > I had to do this in my Struts demo at JavaOne Japan, for example, in > > order to display the Japanese characters correctly. Setting pageEncoding > > would not have done this. > > If the pageEncoding is not set, container applies encoding specifed in > contentType attribute, isn't it ? And, if the contentType is not set or > has no charset part, container applies ISO-8859-1 as I think UTF-8 > should be applied. UTF-8 is the most suitable encoding for a default, > because it is a language independent encoding. The spec's say ISO-8859-1. > > --- > Yoko Kamei Harada, Web Studio Ne-Po-Le > http://www.netpotlet.com/ > > -- > To unsubscribe, e-mail: > For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: