Arun Thomas wrote:
> Maybe my posting confused two issues....  One of my issues had to do with
> ResourceBundles.  I hadn't been able to find any documentation in the
> JavaDocs
> which specified the encoding used for property resource bundles - it
> appears,
> from the info that Vyacheslav Pedak recently posted, that I didn't read it
> well enough....

I believe property files need to use Unicode \uXXXX escapes for
non-7-bit-ASCII characters.  I believe the native2ascii utility will
help you by taking a property file in a charset like JIS, outputting the
same file with all the non-ASCII chars escaped.

> The second issue, however, was specific to JSP engines....  I was trying to
> understand how the engines can determine the encoding used for storing the
> JSPs.
> In the case of JSPs, I think the it would becoming incredibly difficult to
> use
> if every non ISO-8859-1 character had to be unicode escaped....  Do JSP
> engines
> use a default encoding for reading in JSP pages in order to interpret and
> compile
> them into servlets?

I believe this is specified in the JSP 1.0 and 1.1 specs.  Basically,
you specify the encoding of your JSP file *inside* the JSP file.  Your
very first directive in the file should be:

    <%@ page contentType="text/html; iso8851-15" . . . %>

Your JSP engine *should* examine the encoding portion of the contentType
and interpret all bytes after that point as belonging to that character
set.  I'm pretty sure that JRun 2.3.3 builds >= 155 do this.  I don't
know about other engines.

I would be interested in others opinions on this part of the spec, esp.
those working on Tomcat or other implementations...

                        -=- D. J.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to