Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Strange. Displaying Japanese characters

843833Jul 4 2001 — edited Jul 13 2001
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=SJIS">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
</HEAD>
<BODY>
<%   
       String japStr = "???[?U????" ;     
       byte[] test = (japStr).getBytes() ;
       out.println("hello :"+new String(test)) ;
%>
<BR>
<% 
     out.println("hello again : "+japStr) ; 
%>
</BODY>
</HTML>
I am not able to print the Japanese characters on web page in the first println. It shows "hello :???[?U???? "

But I am able to print the Japanese characters in the second println.

Why ? Some one please explain that to me.

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 10 2001
Added on Jul 4 2001
3 comments
206 views