Hi All,
Just having a rather annoying problem with character encoding and JRun:
I wish to write .jsp pages in the ISO-8859-2 character set (which is the
default encoding for the OS), but output them as UTF-8. At the top of every
jsp page, I put: <%@ page contentType="text/html; charset=UTF-8"%>. This
will work as long as the page contains only US-ASCII. As soon as I put any
ISO-8859-2 codes in the page, I get a 'Document contains no data' error
message. While if I set the charset=ISO-8859-2, everything works fine. It
seems that JRun makes an incorrect assumption that the charset I specify for
output is also the charset for the file which resides on my filesystem.
Java will normally perform this conversion from IS0-8859-2 to internal
Unicode if you use the java.io.Reader classes, but I guess JRun is not using
the technique. I have also tried to set the 'default encoding' in 'Page
compilation' in the Admin, but it doesn't seem to have any effect.
Does anyone know if there is a way to get JRun to read the files as if they
are encoded in the filesystem's default encoding?
Rob McArthur
===========================================================================
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