我把程序的帮助文档汉化了,可是在调用数据库内信息显示的时候是乱码,我急啊!!
代码如下,请高手看看.<HTML>
 <HEAD>
<meta http-equiv=Content-Type content="text/html; charset=gb2312">
   <TITLE>General problem </TITLE>
 <LINK REL="StyleSheet" HREF="7728errors.css"></HEAD>
  <BODY >
    <SCRIPT LANGUAGE="JavaScript" SRC="getobject.js"></SCRIPT>
  <H1>
   <span DATASRC="#messagedb" DATAFLD="OPERATOR_MESSAGE"></span>
  </H1>
  <P>
   仍然还有问题或者程序有问题.</P>
  <H2>
   处理方法:</H2>
  <P>
   <SCRIPT SRC="call_analyst.js"></SCRIPT>
 </BODY>
</HTML>脚本代码如下:
document.write("<ol>")
  document.write("<li>记录如下信息和代码:<p>")
  document.write("<TABLE CELLPADDING=3 CELLSPACING=2 BORDER=3>")
  document.write("  <TR>")
  document.write("     <TD VALIGN=TOP>")
  document.write("      <P ALIGN=LEFT>")
  document.write("       <IMG SRC='graphics/write1.GIF' ALIGN=BOTTOM WIDTH=38 HEIGHT=38 VSPACE=0 HSPACE=0 BORDER=0 LOOP=0>")
  document.write("     </TD>")
  document.write("     <TD VALIGN=TOP>")
  document.write("      <P ALIGN=LEFT>")
  document.write("      Code: <font face=Courier><span DATASRC=#messagedb DATAFLD=MESSAGEID></span></font><br>")
  document.write("      Message:<font face= 宋体 > <span DATASRC=#messagedb DATAFLD=DIAGNOSTIC_MESSAGE></span></font>&nbsp;")
  document.write("     </TD>")
  document.write("    </TR>")
  document.write("</TABLE><p>")
  document.write("<li>联系技术人员11:<p>")
  document.write("<TABLE CELLPADDING=3 CELLSPACING=2 BORDER=3>")
  document.write("  <TR>")
  document.write("    <TD VALIGN=TOP>")
  document.write("      <P ALIGN=LEFT>")
  document.write("      <IMG SRC='graphics/contact.GIF' ALIGN=BOTTOM WIDTH=38 HEIGHT=38 VSPACE=0 HSPACE=0 BORDER=0 LOOP=0>")
  document.write("    </TD>")
  document.write("    <TD VALIGN=CENTER>")
  document.write("      <P ALIGN=LEFT>")
  document.write("      系统分析员&nbsp;")
  document.write("    </TD>")
  document.write("  </TR>")
  document.write("</table>")
  document.write("</ol>")

解决方案 »

  1.   

    jsp页面保存到数据库有乱码解决方法Jsp+tomcat+bean中文乱码问题解决方法javabean中参数有乱码
    1) 所有的jsp页面指定字符编码方式,如:Charest=gb2312,Charest=UTF-8等等
    2) 在应用服务器中的server.xml方件中找到设置服务器端口的行,一般是这样开头:”<Connector port="8080"”,
    3) 在找到的行"<Connector"开头的字符串后加上:URIEncoding="UTF-8" ,保存文件
    --------------------------------------------------------------------------
    jsp页面有乱码解决方法    所有的jsp页面指定字符编码方式,如:Charest=gb2312,Charest=UTF-8等等
        <%@ page contentType="text/html; charset=UTF-8">
    --------------------------------------------------------------------------
    jsp单个中文参数乱码解决方法    用这个转换一下: 
        <%!String trans(String chi)
           {
            string result =null;
            byte temp[];
            temp=chi.getBytes("iso=8859-1");
            result= new String(temp);
            }
        %>
    或者直接这样:
        <% 
          request.setCharacterEncoding("UTF-8");
          out.println(request.getParameter("参数ID")
        %>
    --------------------------------------------------------------------------