Krishna,
Krishnamohan Meduri wrote On 11/06/06 17:23,:
>Hi,
>
>Glassfish with JDK6 produces undesired results (with some characters
>messed up) for the attached JSP Document.
>The same produces the desired results with JDK5.
>
>Is this any known issue in JDK6? If so, Could somebody pls give me the
>details?
>
>
No details, but here's a related issue:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6473140
("getCharacterEncoding() did not return the default-charset on
windows2003(JDK 6, AS90PE)")
that was filed against GlassFish.
I've done some initial investigation, and it looks like creating a
String, using the String constructor that takes a charsetName, throws
an UnsupportedEncodingException when specifying "Shift_JIS" as the
encoding on Windows (we use the String constructor that takes a
charsetName argument as a test to see if the encoding passed to
ServletRequest.setCharacterEncoding() is valid and supported by the
runtime). I've asked the submitter to confirm.
Do you see any UnsupportedEncodingException in your server log? Also,
do you see this problem on Windows only?
Jan
>Thanks,
>-Krishna.
>
>
>------------------------------------------------------------------------
>
><?xml version="1.0" encoding="big5"?>
><!--
> @author James Cai, for I18N feature in JSP 2.0 in XML
>
> Configuration as the following:
> Syntax pageEncoding contentType XML-prolog
> XML big5 gb2312 -
>-->
>
><jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
>version="2.0">
><jsp:directive.page contentType="text/html; charset=gb2312" />
><jsp:text><![CDATA[<HTML>
><HEAD>
> <TITLE>I18N TEST JSP2.0</TITLE>
></HEAD>
>
><BODY>
>
><FONT SIZE='+3'>
>
><CENTER>
>
><BR/>
>
>
><H1>Test Name: XML8-gb </H1>
>
><BR/>
><BR/>
><TABLE BORDER='1'>
><TR><TH>Language</TH><TH>Charset</TH></TR>
><TR><TD>Chinese</TD><TD>gb2312</TD></TR>
></TABLE>
>
><BR/>
>
>The following is Chinese character with gb2312 charset:
>
><BR/><BR/>
>
>¾©±¨ÍøÑ¶£¨¼ÇÕß¡¡¶¡ÕØÎÄ£©´Ó½ñÌ쿪ʼ£¬ÃÀ¹úÂéÊ¡Àí¹¤Ñ§ÔºË¹Â¡¹ÜÀíѧԺÓëÇ廪´óѧ¾¹ÜѧԺ¡¢¸´µ©´óѧ¹ÜÀíѧԺ¡¢Ïã¸ÛÁëÄÏ´óѧ
> ΪºÏ×÷ÅàÑø¹ú¼ÊMBA£¬ÔÚÏã¸ÛÕÙ¿ª¹ËÎÊίԱ»á»áÒé¡£¼ÇÕß×òÌì´ÓÇ廪´óѧ»ñϤ£¬×÷Ϊ¸÷×Ô¹ú¼Ò×î¶¥¼âµÄÉÌѧԺ֮һµÄÇ廪´óѧ
> ¾¹ÜѧԺÓëÂéÊ¡Àí¹¤Ñ§ÔºË¹Â¡¹ÜÀíѧԺ£¬ÔÚÔ²ÂúÍê³ÉÁ˵ÚÒ»¸öÎåÄêÖÜÆÚµÄºÏ×÷Ö®ºó£¬ÒѾ¾ö¶¨´Ó½ñÄêÆðÐøÇ©ÎåÄêµÄºÏ×÷ÏîÄ¿£¬Ë«·½
> ´Ó1500ÃûÉêÇëÕßÖÐÑ¡°Î³öµÄÐÂÒ»Åú120ÃûºÏ×÷ÅàÑøµÄ¹ú¼ÊMBAѧԱ£¬¼´½«ÓÚ½ñÄê9Ô½øÇ廪´óѧ¡£
>
> Ç廪´óѧ¾¹ÜѧԺԺ³¤ÕÔ´¿¾ù×òÌìÔÚ½ÓÊܼÇÕ߲ɷÃʱ±íʾ£¬Ç廪×Ô1996ÄêÓëÂéÊ¡Àí¹¤ºÏ×÷ÒÔÀ´£¬ÖÁ½ñÒÑÅàÑøÁËÈýÆÚ¹²100ÓàÃû¹ú
> ¼ÊMBAѧԱ£¬ÕâЩ±ÏҵѧԱһ°ã¶¼È¥Á˹úÄÚÍâµÄ¿ç¹úÆóÒµºÍ×éÖ¯£¬Ò»Ö±¹©²»Ó¦Çó£¬ÓеÄÔڶ̶ÌÁ½ÈýÄêÄÚ£¬¾ÍÒÑ¾×øµ½ÁËCEO
> µÄλÖã»ÔÚºÏ×÷ÆÚ¼ä£¬Ç廪ÏȺóÅɳö20ÓàÃû½Ìʦ£¬ÔÚ˹¡¾¼Ã¹ÜÀíѧԺѧϰ¡£ÕÔ´¿¾ùÔº³¤»¹Í¸Â¶£¬ÔÚ¹ýÈ¥µÄºÏ×÷ÖУ¬Ç廪·½ÃæµÄÖ÷
> Òª¾«Á¦¼¯ÖÐÔÚÁ˱ØÐ޿εĽ¨Éè·½Ãæ£¬ÔÚµÚ¶þ¸öÎåÄêµÄºÏ×÷ÖУ¬·ÅÔÚÑ¡Ð޿η½ÃæµÄ¾«Á¦»á¶àһЩ¡£Í¬Ê±£¬ÕâÖÖÀàËÆÓÚ¼¼ÊõתÈõÄÄ£
> ʽ£¬ÔÚ¾ÀúÁËÎåÄêµÄºÏ×÷ºóÒѾʵÏÖÁ˽«¹úÍâ³ÉÊìµÄMBAÅàÑøÄ£Ê½ÒÆÖ²µ½¹úÄÚµÄÄ¿±ê¡£
>
> ×òÌìר³Ìµ½±±¾©²Î¼ÓÇ廪2001½ì¹ú¼ÊMBA±ÏÒµµäÀñµÄ˹¡¹ÜÀíѧԺǰÈÎÔº³¤¡¢ÖøÃû¹ú¼Ê¾¼Ãѧ¼Ò˹Èô½ÌÊÚÒ²ÈÏΪ˫·½Ç°ÎåÄê
> µÄºÏ×÷·Ç³£³É¹¦£¬ËûÔø¾Í¨¹ýÊÓÆµ»áÒéµÄ·½Ê½¡°Ãæ¶ÔÃæ¡±µØÎªÇ廪¹ú¼ÊMBAѧԱÊÚ¹ý¿Î£¬ËûÈÏΪÖйúµÄ¹ú¼ÊMBAÏîÄ¿ÒÔ¼°Åà
> Ñø³öµÄѧԱ¶¼²»±ÈÃÀ¹ú²î£¬Î©Ò»µÄȱµãÔÚÓÚѧÉúµÄ³É·Öȱ·¦¹ú¼ÊÐÔ£¬ÔÚÃÀ¹ú´óÔ¼40£¥µÄѧԱÀ´×ÔÓÚÆäËû²»Í¬µÄ¹ú¼Ò£¬¶øÔÚÖйú¼¸ºõ
> ÊÇÇåһɫµÄ¹úÄÚѧԱ¡£
>
></CENTER>
><BR/>
><BR/>
>]]></jsp:text>
><jsp:text>CharacterEncoding:
></jsp:text>
><jsp:expression>response.getCharacterEncoding()</jsp:expression>
><jsp:text><BR/></jsp:text>
><jsp:text><![CDATA[
></body>
></html>
>]]></jsp:text>
></jsp:root>
>
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>
>