tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject RE: RE2: Jsp compile option for Big5 encoding / encoding question
Date Mon, 03 Dec 2001 16:29:42 GMT


On Mon, 3 Dec 2001, Ing. Gabriel Gajdos wrote:

> Date: Mon, 3 Dec 2001 11:02:50 +0100
> From: Ing. Gabriel Gajdos <Gabriel.Gajdos@ses.sk>
> Reply-To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> To: tomcat-user@jakarta.apache.org
> Subject: RE: RE2: Jsp compile option for Big5 encoding / encoding question
>
> Thanx, Craig, but something is wrong...
>
> | Yes, dynamically setting the content type and character encoding is
> | supported in JSP 1.2 (and therefore in Tomcat 4).  You have three choices:
> |
> | * You can use a scriptlet to set the content type at the top of your
> |   JSP page:
> |
> |   <%
> |     String contentType = "text/html;charset=xxxxx"; // Or whatever
> |     response.setContentType(contentType);
> |   %>
>
> without success.
> I am using Tomcat 4.0.1.
> Also tried Tomcat 3.2.3 with very similar behaviour (and result).
>
> JSP (start file):
> <%
>   String contentType = "text/html;charset=windows-1250";
>   response.setContentType(contentType);
> %>
>

The setting "windows-1250" is not a valid character encoding name in Java.
Try "Big5" instead for Traditional Chinese.  Valid character encoding
names are listed in the Internationalization documentation of the JDK:

  http://java.sun.com/j2se/1.4/docs/guide/intl/encoding.doc.html

Craig


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message