<%@page contentType="text/html;charset=gb2312"%>
<%@ page import="java.sql.*" %>
<%!
 public String ex_chinese(String str){
     if(str==""){
     str  ="null" ;
     }
     else{
         try {
        str = new String(str.getBytes("iso-8859-1"),"gb2312") ;
         }
         catch (Exception ex) {
         }
     }
     return str ;
  }
%> 字段名=ex_chinese(字段名);
我用过了,可以
<%@page contentType="text/html;charset=gb2312"%>
<%@ page import="java.sql.*" %>
<%!
 public String ex_chinese(String str){
     if(str==""){
     str  ="null" ;
     }
     else{
         try {
        str = new String(str.getBytes("iso-8859-1"),"gb2312") ;
         }
         catch (Exception ex) {
         }
     }
     return str ;
  }
%> 字段名=ex_chinese(字段名);
我用过了,可以
<%@page contentType="text/html;charset=gb2312"%>
<%@ page import="java.sql.*" %>
<%!
 public String ex_chinese(String str){
     if(str==""){
     str  ="null" ;
     }
     else{
         try {
        str = new String(str.getBytes("iso-8859-1"),"gb2312") ;
         }
         catch (Exception ex) {
         }
     }
     return str ;
  }
%> 字段名=ex_chinese(字段名);
我用过了,可以