tomcat 4.1.29 and static content in non Latin (ISO-8895-1) characters
Hello, I red some similar problems reported, but I'd like to post my question to the tomcat user community. I have an existing static documents (something.html) which has to be seen in Cyrillic (Windows-1251). An appropriate meta tag is included to tell the browser to use the right charset: meta http-equiv=Content-type content=text/html; charset=windoes-1251 Seems the new html connector (coyote 1.1) that comes with tomcat 4.1.29 strictly follows the standard and returns HTTP Header Content-type: text/html ; charset=ISO-8859-1 if no character encoding has been specified. The browser is forced to show the Cyrillic in ISO-8859-1. I suppose any other non latin languages have the same problem. JSP pages works fine if %@ page contentType= text/html; charset=Windows-1251 is specified. The same problem appears with filters (like sitemesh for example), as far as the content comes from a static .html it's not shown properly even with %@ page contentType directive specified. Does anyone found out a solution of this problem or are there any plans tomcat to support static non latin content. Many Thanks Yavor Trapkov __ McAfee VirusScan Online from the Netscape Network. Comprehensive protection for your entire computer. Get your free trial today! http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397 Get AOL Instant Messenger 5.1 free of charge. Download Now! http://aim.aol.com/aimnew/Aim/register.adp?promo=380455 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat 4.1.29 and static content in non Latin (ISO-8895-1) characters
Have you tried running the page through native2ascii and then using the output of that as your JSP? -Original Message- From: Yavor Trapkov [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 1:16 AM To: [EMAIL PROTECTED] Subject: tomcat 4.1.29 and static content in non Latin (ISO-8895-1) characters Hello, I red some similar problems reported, but I'd like to post my question to the tomcat user community. I have an existing static documents (something.html) which has to be seen in Cyrillic (Windows-1251). An appropriate meta tag is included to tell the browser to use the right charset: meta http-equiv=Content-type content=text/html; charset=windoes-1251 Seems the new html connector (coyote 1.1) that comes with tomcat 4.1.29 strictly follows the standard and returns HTTP Header Content-type: text/html ; charset=ISO-8859-1 if no character encoding has been specified. The browser is forced to show the Cyrillic in ISO-8859-1. I suppose any other non latin languages have the same problem. JSP pages works fine if %@ page contentType= text/html; charset=Windows-1251 is specified. The same problem appears with filters (like sitemesh for example), as far as the content comes from a static .html it's not shown properly even with %@ page contentType directive specified. Does anyone found out a solution of this problem or are there any plans tomcat to support static non latin content. Many Thanks Yavor Trapkov __ McAfee VirusScan Online from the Netscape Network. Comprehensive protection for your entire computer. Get your free trial today! http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397 Get AOL Instant Messenger 5.1 free of charge. Download Now! http://aim.aol.com/aimnew/Aim/register.adp?promo=380455 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat 4.1.29 and static content in non Latin (ISO-8895-1) characters
Hi I have same problem. If you change apache httpd.conf file AddDefaultCharset windows-1251 static data has to be seen Cyrillic. However it is very bad solution:-) -Original Message- From: George Sexton [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 10:06 PM To: 'Tomcat Users List' Subject: RE: tomcat 4.1.29 and static content in non Latin (ISO-8895-1) characters Have you tried running the page through native2ascii and then using the output of that as your JSP? -Original Message- From: Yavor Trapkov [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 1:16 AM To: [EMAIL PROTECTED] Subject: tomcat 4.1.29 and static content in non Latin (ISO-8895-1) characters Hello, I red some similar problems reported, but I'd like to post my question to the tomcat user community. I have an existing static documents (something.html) which has to be seen in Cyrillic (Windows-1251). An appropriate meta tag is included to tell the browser to use the right charset: meta http-equiv=Content-type content=text/html; charset=windoes-1251 Seems the new html connector (coyote 1.1) that comes with tomcat 4.1.29 strictly follows the standard and returns HTTP Header Content-type: text/html ; charset=ISO-8859-1 if no character encoding has been specified. The browser is forced to show the Cyrillic in ISO-8859-1. I suppose any other non latin languages have the same problem. JSP pages works fine if %@ page contentType= text/html; charset=Windows-1251 is specified. The same problem appears with filters (like sitemesh for example), as far as the content comes from a static .html it's not shown properly even with %@ page contentType directive specified. Does anyone found out a solution of this problem or are there any plans tomcat to support static non latin content. Many Thanks Yavor Trapkov __ McAfee VirusScan Online from the Netscape Network. Comprehensive protection for your entire computer. Get your free trial today! http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397 Get AOL Instant Messenger 5.1 free of charge. Download Now! http://aim.aol.com/aimnew/Aim/register.adp?promo=380455 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat 4.1.29 and static content in non Latin (ISO-8895-1) characters
Galbayar wrote: Hi I have same problem. If you change apache httpd.conf file AddDefaultCharset windows-1251 static data has to be seen Cyrillic. However it is very bad solution:-) For a real fix, you can apply a patch to the Tomcat code: Index: Response.java === RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Response.java,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- Response.java 14 Oct 2003 19:21:25 - 1.29 +++ Response.java 11 Nov 2003 20:56:56 - 1.30 @@ -552,9 +552,11 @@ String ret = contentType; -if (ret != null characterEncoding != null) { -ret += ;charset=; -ret += characterEncoding; +if (ret != null + characterEncoding != null + !(Constants.DEFAULT_CHARACTER_ENCODING.equals + (characterEncoding))) { +ret = ret + ;charset= + characterEncoding; } return ret; -- x Rémy Maucherat Senior Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]