Hi all.
It's me again and troubles are not resolved. I've created a simple test servlet:
----------------------------------------
import javax.servlet.*;
import java.io.*;
public class TestServlet extends GenericServlet {
private static final String testText = "\uC5A0 \uC5A1 \uC486 \uC487 \uC48C \uC48D
\uC490 \uC491 \uC5BD \uC5BE";
PrintWriter out;
public void service( ServletRequest req, ServletResponse res )
throws javax.servlet.ServletException, java.io.IOException
{
res.setContentType("text/html; charset=ISO-8859-2");
out = res.getWriter();
out.print( "<html>\r\n<head><title>Test servlet</title>\r\n" );
out.print( "<meta http-equiv=\"Content-Type\" content=\"text/html;
charset=iso-8859-2\">\r\n</head>\r\n" );
out.print( "<body>\r\n<h1>Test</h1>\r\n<p>Let us see how this gets
out</p>\r\n<p>\r\n<p>" );
out.print( testText );
out.print( "</p>\r\n</body>\r\n</html>" );
}
}
----------------------------------------
This prints "?" instead of characters. The string in question prints desired
characters in an ordinary Java application.
QUESTION 1
---------------
How can I get Tomcat to honour "charset=ISO-8859-2"?
QUESTION 2
---------------
What about static HTML? Suppose I should enter a part of static HTML data in Latin-2
encoding. That translates to a string. A string is supposed to be Unicode. Do those
strings get translated from "pageEncoding" to Unicode?
Nix.