• Post Reply Bookmark Topic Watch Topic
  • New Topic

Chinese Character problem  RSS feed

 
Xu Li
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using a JSP calls an applet by Javascript. Then the applet returns to the JSP also by Javascript. My problem is that when the applet returns to the JSP, there is Chinese characters in the URL. The Chinese characters cannot be shown correctly in the web page. However, the Chinese characters can be shown correctly in the JOptionPane. The charset defined in the JSP is GBK. Pls. see the following code in the applet to return to JSP.
import netscape.javascript.*;
try {
JSObject.getWindow(this).call(functionName, &name=ChineseCharacters);
} catch (Exception e) {
e.printStackTrace();
}
functionName is a Javascript function name. The &name=ChineseCharacters is the parameter passed into the Javascript function to reload the web page with &name=ChineseCharacters .
Rgs,
lixu
 
Michael Deng
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you set the charset of ChineseCharacters? I guess you should use the same charset in the applet and jsp.
You can get more info from:
http://www.jguru.com/faq/printablefaq.jsp?topic=I18N
 
Xu Li
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The charset of each jsp is already set to GBK according to the whole design of the project.
Rgs,
lixu
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!