1-1-16-6-10 请教如何解决JSP中文输出问题
发信人: crist (wait,wait..), 信区: Java标题: Re: 请教如何解决JSP中文输出问题
发信站: BBS 水木清华站 (Thu Apr 26 10:06:33 2001)
我把你的程序修改了一下,现在可以看汉字了。
<html>
<head>
<title>JSP TEST CHINESE</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<%
String result = "";
if (result!=null)
result = new String(result.getBytes("GB2312"),"ISO8859_1");
result = "打击";
out.println("hello world<br>");
out.println(result);
%>
</html>
不过我的系统是Win2000 + Orion
【 在 fall26 (jz) 的大作中提到: 】
: 我使用了某为大侠建议的如下方法:
: <html>
: <head>
: <title>JSP中文问题解决方案</title>
: <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
: </head>
: <%
: String result = new String("JSP中文问题解决方案".getBytes("GB2312"),
: "ISO8859_1");
: out.println("hello world<br>");
: out.println(result);
: ...................
页:
[1]