D2002 发表于 2015-01-26 16:39

JSP中从Informix数据库得到的汉字乱码(老问题已解决,出现新问题)

本帖最后由 D2002 于 2015-01-28 14:47 编辑

哪个大侠碰到过,可以解决?

配置一个很简单JSP测试程序。

1. 环境:
1) Redhat Enterprise Linux Server 5.5 (64bit)
2) Informix 11.50.FC9
3) JDK 1.8.0_25
4) Tomcat 8.0.17

2. 数据库实例ibsdb,DB的NLS属性

NLS Capabilities and Attributes
   en_US.819 Collating Sequence
   en_US.819 CType

在Linux下,informix用户下编写一个java程序,通过jdbc连接数据库,得到的汉字不乱码。

$ LANG=zh_CN.GBK; export LANG
$ javac DBSelect.java
$ java DBSelect "jdbc:informix-sqli://22.32.1.120:6005:INFORMIXSERVER=dbserver;USER=dbuser; PASSWORD=dbpassword;NEWCODESET=GBK,8859-1,819"
得到的汉字显示正常。

3. TOMCAT中 设置:

1) context.xml: 加入Resource属性

......
username="dbuser"
password="dbpassword"
url="jdbc:informix-sqli://22.32.1.120:6005/ibsdb:INFORMIXSERVER=dbserver;NEWLOCAL=zh_CN,en_US:NEWCODESET=GBK,8859-1,819"
......


***把url换成:
(1) url="jdbc:informix-sqli://22.32.1.120:6005/ibsdb:INFORMIXSERVER=dbserver;NEWLOCAL=zh_CN,en_US.819:NEWCODESET=GBK,8859-1,819:CLIENT_LOCALE=zh_CN.gb: DB_LOCALE=zh_CN.gb"
(2) url="jdbc:informix-sqli://22.32.1.120:6005/ibsdb:INFORMIXSERVER=dbserver;NEWLOCAL=zh_CN,en_US.819:NEWCODESET=GBK,8859-1,819:CLIENT_LOCALE=zh_CN.gb: DB_LOCALE=en_US.8859-1"
......
等等,还是解决不了数据库中取出的汉字显示乱码问题。

2) 修改server.xml:

    <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443"
               URIEncoding="GBK" />

webapps下,写一个 index.jsp

<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page contentType="text/html;charset=gbk" language="java" %>

<sql:query var="rs" dataSource="jdbc/ibsdb">
select bank_no, ename, cname from cin_bank
</sql:query>

<!DOCTYPE HTML>
<HTML>
<HEAD>
    <title>Informix DB Test测试</title>
</HEAD>
<BODY>

<h2>Results 结果</h2>

<c:forEach var="row" items="${rs.rows}">
    BANKNO: ${row.bank_no}<br/>
    ESNAME: ${row.ename}<br/>
    CNNAME: ${row.cname}<br/>
    <br/>
</c:forEach>

</BODY>
</HTML>

服务器IP:22.32.1.120
浏览器中运行网页:http://22.32.1.120:8080/index.jsp(网页中汉字可显示,但数据库中得到的汉字乱码)

Results 结果

BANKNO: LTCBHED
ESNAME: LONG-TERM CREDIT BANK OF JAPAN LIMITED, TOKYO, JAPAN
CNNAME: ??±??¤??????????(????)

BANKNO: SMITJS
ESNAME: SUMITOMO BANK LIMITED, TOKYO JAPAN
CNNAME: ×???????(????)

BANKNO: SANWJS
ESNAME: SANWA BANK LIMITED,OSAKA JAPAN
CNNAME: ????????(?ó??)

BANKNO: BISHJT
ESNAME: MITSUBISHI BANK LIMITED,TOKYO,JAPAN
CNNAME: ????????(????)

BANKNO: TKAIJN
ESNAME: TOKAI BANK,LTD.,NAGOYA,JAPAN
CNNAME: ????????(??????)

BANKNO: UOVBSG
ESNAME: UNITED OVERSEAS BANK LIMITED,SINGAPORE
CNNAME: ?ó??????(??????)

BANKNO: SCBKHH
ESNAME: SHANGHAI COMMERCIAL BANK LTD., HONGKONG, H.O.
CNNAME: ????????????(????)

D2002 发表于 2015-01-28 14:32

本帖最后由 D2002 于 2015-01-28 15:21 编辑

老问题解决,出现新问题了

context.xml文件的Resource属性中的uri改成:

url="jdbc:informix-sqli://22.32.1.120:6005/ibs:INFORMIXSERVER=dbserver;NEWCODESET=gbk,8859-1,819;NEWLOCAL=zh_CN,en_US.819"

显示的汉字不乱码,但是随着index.jsp文件中的SQL SELECT条件变化,就会出现运行问题。

1) index.jsp中的SQL 语句:

select bank_no, ename, cname from cin_bank where bank_no = 'A'

select bank_no, ename, cname from cin_bank where bank_no = 'CI'

汉字都不乱码,可以正常显示。

2)index.jsp中的SQL 语句:

select bank_no, ename, cname from cin_bank

select bank_no, ename, cname from cin_bank where bank_no = 'C'
(或 bank_no like 'C%' 或bank_no = 'H'或 bank_no = 'S' )

浏览器中就会出现这样的异常信息:

HTTP Status 500 - javax.servlet.ServletException: javax.servlet.jsp.JspException:

type Exception report

message javax.servlet.ServletException: javax.servlet.jsp.JspException:

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException:
select bank_no, ename, cname from cin_bank where bank_no = 'C'
: Encoding or code set not supported.
        org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:584)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:454)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
        org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
root cause

javax.servlet.ServletException: javax.servlet.jsp.JspException:
select bank_no, ename, cname from cin_bank where bank_no = 'C'
: Encoding or code set not supported.
        org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:904)
        org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:837)
        org.apache.jsp.index_jsp._jspService(index_jsp.java:147)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:431)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
        org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
root cause

java.sql.SQLException: Encoding or code set not supported.
        com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:413)
        com.informix.jdbc.IfxChar.fromIfx(IfxChar.java:235)
        com.informix.jdbc.IfxRowColumn.a(IfxRowColumn.java:380)
        com.informix.jdbc.IfxSqli.loadColumnData(IfxSqli.java:4788)
        com.informix.jdbc.IfxResultSet.a(IfxResultSet.java:689)
        com.informix.jdbc.IfxResultSet.b(IfxResultSet.java:641)
        com.informix.jdbc.IfxResultSet.getObject(IfxResultSet.java:1511)
        com.informix.jdbc.IfxResultSet.getObject(IfxResultSet.java:809)
        org.apache.taglibs.standard.tag.common.sql.ResultImpl.<init>(ResultImpl.java:91)
        org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doEndTag(QueryTagSupport.java:216)
        org.apache.jsp.index_jsp._jspx_meth_sql_005fquery_005f0(index_jsp.java:189)
        org.apache.jsp.index_jsp._jspService(index_jsp.java:116)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:431)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
        org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
note The full stack trace of the root cause is available in the Apache Tomcat/8.0.17 logs.

Apache Tomcat/8.0.17

D2002 发表于 2015-01-28 16:19

本帖最后由 D2002 于 2015-01-28 16:37 编辑

Informix JDBC使用比较麻烦,在汉字乱码情况下,结果集中可以得到全部记录,但是在汉字不乱码情况下,结果集中的得到部分记录(不是全部记录),不知道什么原因。
下面index1.jsp简单例子,就是存在上面说的问题!

<%@ taglib uri="http://java. sun.com/jsp/jstl/sql" prefix="sql" %>
<%@ taglib uri="http://java. sun.com/jsp/jstl/core" prefix="c" %>
<%@ page language="java" contentType="text/html; charset=gbk" pageEncoding="gbk"%>
<%@ page language="java" import="java.util.*,javax.naming.*,java.sql.*,javax.sql.*"%>
<!DOCTYPE HTML>
<HTML>
<HEAD>
    <meta http-equiv="Content-Type" content="text/html;charset=gbk" />
    <title>Informix DB Test测试</title>
</HEAD>
<BODY>

<h2>INDEX 01 Results 结果(中文测试)</h2>
<%
    out.print("<h3>查询结果</h3><br/>");

    int nCnt = 0;
    //获取JNDI名称
    String strLookup = "java:comp/env/jdbc/ibsdb";
    String strSQLstmt = "select BANK_NO, CNAME, ENAME from CIN_BANK";
    Context ctx = new InitialContext();

    //从JNDI树上取得连接池实现
    DataSource dataSource = (DataSource) ctx.lookup(strLookup);
    Connection conn = dataSource.getConnection();
    PreparedStatement pstat = conn.prepareStatement( strSQLstmt );
    ResultSet resu = pstat.executeQuery();
    try {
      while ( resu.next() ) {
            nCnt++;
            out.print("银行编码: " + resu.getString("BANK_NO") + "<br/>" );
            out.print("中文名称: " + resu.getString("CNAME")   + "<br/>" );
            out.print("英文名称: " + resu.getString("ENAME")   + "<br/>" );
            out.print("<br/>");
            out.flush();
      }
      out.print("共查询到 " + nCnt + " 条记录.<br/>" );
      out.flush();
    } finally {
      if ( resu != null ) {
            resu.close();
      }
      if ( pstat != null ) {
            pstat.close();
      }
      if ( conn != null ) {
            conn.close();
      }
    }
%>

</BODY>
</HTML>

liaosnet 发表于 2015-01-29 00:06

回复 2# D2002


    把这几条有问题的原始数据都弄上来,注意:必须是原始的中文!

D2002 发表于 2015-01-30 09:25

本帖最后由 D2002 于 2015-01-30 09:28 编辑

liaosnet 发表于 2015-01-29 00:06 static/image/common/back.gif
回复 2# D2002




表cin_bank中的原始记录有几千条,使用index.jsp时候,不加where条件时候, 每次查询到的记录数不一定的,有时候70多个,有时候100多个。所以不知道哪几条是有问题的原始记录。

当加where条件后,比如: where bank_no = 'CI', 那么可以查询到所有记录。

使用index1.jsp查询时候,做注释处理:
// out.print("中文名称: " + resu.getString("CNAME")   + "<br/>" );
就没有问题了。

估计还是getString对汉字处理问题,可能的解决方法,就是先用getByte处理,然后再转码,这样做就是太麻烦。

还是C语言处理汉字比较好,几乎没有问题。

D2002 发表于 2015-01-30 09:41

本帖最后由 D2002 于 2015-01-30 09:44 编辑

选取一个有问题记录结果最少的子集:
select bank_no, ename, cname from cin_bank where bank_no = 'H'

原始数据查询结果:


bank_noHABA33
ename    HABIB BANK LTD.,NEW YORK (FOREIGN EXCHANGE BR.)
cname    HABIB BANK LTD.,NEW YORK

bank_noHABABIB
ename    HABIB BANK LTD.,KARACHI
cname    HABIB BANK LTD.,KARACHI

bank_noHABABIB1
ename    HABIB BANK LIMITED
cname    HABIB BANK LIMITED

bank_noHABAHH
ename    HABIB FINANCE INTERNATIONAL LTD.,HONG KONG
cname    HABIB FINANCE INTERNATIONAL LTD

bank_noHABARA
ename    HABIB BANK LTD.,RAWALPINDI CITY
cname    HABIB RAWALPINDI

bank_noHABBBIC
ename    HABIB BANK LTD.,FROEIGN EXCHANGE BR.,KARACHI      PAKISTAN
cname    HABIB BANK LTD.,FROEIGN EXCHANGE BR.

bank_noHABBKK
ename    HABIB BANK LIMITED S.I.T.E.BR. PAKISTAN
cname    HABIB BANK LIMITED S.I.T.E.BR. PAKISTAN

bank_noHABISL
ename    HABIB BANK LTD.,SRI LANKA
cname    HABIB BANK LTD.,SRI LANKA

bank_noHABKJT
ename    THE HACHIJUNI BANK, LTD. TOKYO, JAPAN
cname    THE HACHIJUNI BANK, LTD. TOKYO, JAPAN

bank_noHACHIJUN
ename    HACHIJUNI BANK LTD.,TOKYO
cname    HACHIJUNI BANK LTD.,TOKYO

bank_noHAGS33
ename    SPARKASSE HAGEN,HAGEN,GERMANY
cname    SPARKASSE HAGEN,HAGEN,GERMANY

bank_noHALAHH
ename    HAMBURGISCHE LANDESBANK GIROZENTRALE
cname    HAMBURGISCHE LANDESBANK

bank_noHAMA33
ename    BANK OF YOKOHAMA NEW YORK BRANCH
cname    BANK OF YOKOHAMA NEW YORK BRANCH

bank_noHAMAJP
ename    BANK OF YOKOHAMA YOKHAMA BR.,JAPAN
cname    BANK OF YOKOHAMA YOKHAMA BR.,JAPAN

bank_noHAMAJT
ename    BANK OF YOKOHAMA LTD.,TOKYO, JAPAN
cname    横滨银行(东京)

bank_noHAMATA
ename    THE BANK OF YOKOHAMA, LTD., TOKYO,JAPAN
cname    THE BANK OF YOKOHAMA, LTD., TOKYO,JAPAN

bank_noHANA****
ename    ALLIED BANKING CORPORATION
cname    ALLIED BANKING CORPORATION

bank_noHANAB
ename   
cname   

bank_noHAND33
ename    SVENSKA HANDELSBANKEN NEW YORK BRANCH
cname    瑞典商业银行纽约分行

bank_noHANDFI
ename    SVENSKA HANDELSBANKEN,HELSINKI,FINLAND
cname    SVENSKA HANDELSBANKEN,HELSINKI,FINLAND

bank_noHANDHH
ename    SVENSKA HANDELSBANKEN AB (PUBL) HONGKONG
cname    瑞典商业银行,香港分行

bank_noHANDSG
ename    SVENSKA HANDELSBANKEN,GOTEBORG
cname    瑞典商业银行(GOTEBORG)

bank_noHANDSG1
ename    SVENSKA HANDELSBANKEN AB (PUBL), SINGAPORE
cname    瑞典商业银行,新加坡

bank_noHANDSI
ename    SVENSKA HANDELSBANKEN, INSJON, SWEDEN
cname    SVENSKA HANDELSBANKEN, INSJON, SWEDEN

bank_noHANDSM
ename    SVENSKA HANDELSBANKEN,MALMO
cname    SVENSKA HANDELSBANKEN,MALMO

bank_noHANDSS
ename    SVENSKA HANDELSBANKEN, STOCKHOLM,SWEDEN
cname    瑞典商业银行(斯德哥尔摩)

bank_noHANI6L
ename    HANIL BANK LOS ANGELES,CA,U.S.A.
cname   

bank_noHANIEA
ename    HANVIT BANK(FORMERLY HANIL BANK)
cname    HANVIT BANK

bank_noHANIHH
ename    HANIL BANK(HONGKONG)
cname   

bank_noHANIJA
ename    P.T.HANIL TAMARA BANK, JAKARTA, INDONESIA
cname    P.T.HANIL TAMARA BANK, 吉隆坡,印尼

bank_noHANIJT
ename    HANIL BANK TOKYO,JAPAN
cname   

bank_noHANIKR1
ename    HANIL BANK,TAEGU, KOREA
cname    HANIL BANK,TAEGU

bank_noHANILHX
ename    HANVIT BANK,(FORMERLY HANIL BANK), HONG KONG
cname    HANVIT BANK,(FORMERLY HANIL BANK), HONG KONG

bank_noHANISE
ename    HANVIT BANK, SEOUL, KOREA
cname    HANVIT BANK, SEOUL, KOREA

bank_noHANISE1
ename    HANVIT BANK, INCORPORATING COMMERCIAL OF KOREA LTD., HANIL BANK LTD.,
         SEOUL, KOREA
cname    HANVIT BANK,SEOUL, KOREA.

bank_noHASE33
ename    HANG SENG BANK LTD.,NEW YORK BRANCH,U.S.A.
cname    恒生银行(纽约)

bank_noHASEHH
ename    HANG SENG BANK LTD.,HONGKONG
cname    恒生银行(香港)

bank_noHASEHH1
ename    HANG SENG BANK LTD.,H.O.TRADE FINANCE OPER.DEPT.(EXPORT BILLS OPER.)
cname    恒生银行(H.K.)

bank_noHASEHH2
ename    HANG SENG BANK LTD,HEAD OFFICE, TRADE FINANCE   OPERATIONS DEPT(EXPO
         RT BILLS OPERATIONS),
cname    HANG SENG BANK LTD,HEAD OFFICE, TRADE FINANCE

bank_noHASEHH3
ename    HANG SENG BANK LIMITED, HONG KONG
cname    HANG SENG BANK LIMITED, HONG KONG

bank_noHASEHH4
ename    HANG SENG BANK LIMITED, KLN BAY, HONG KONG
cname    HANG SENG BANK LIMITED, KLN BAY, HONG KONG

bank_noHASEHH5
ename    HANG SENG BANK LIMITED, TRADE SERVICES CENTRE, HONG KONG
cname    HANG SENG BANK LIMITED, TRADE SERVICES CENTRE, HON

bank_noHASEHHKO
ename    HANG SENG BANK LTD., KOWLOON BAY BRANCH, H.K.
cname    HANG SENG BANK LTD., KOWLOON BAY BRANCH

bank_noHASEHHKW
ename    HANG SENG BANK LTD.,KOWLOON MAIN BRANCH
cname    恒生银行九龙分行业

bank_noHASEHHTS
ename    HANG SENG BANK LTD., TSIMSHATSUI BRANCH, HONGKONG
cname    恒生TSIMSHATSUI BRANCH H.K.

bank_noHASPHH
ename    HAMBURGER SPARKASSE(HASPA),HAMBURG,GERMANY
cname    汉堡储蓄银行(汉堡)

bank_noHASPHH1
ename    HAMBURGER SPARKASSE., FOREIGN DEPT.GERMANY
cname    汉堡储蓄银行(汉堡)

bank_noHATR33
ename    HARRIS BANK INTERNATIONAL CORP.,NEW YORK
cname    HARRIS BANK INTERNATIONAL CORP NEW YORK

bank_noHBHL
ename    HARLOW BUTER (HONGKONG) LTD.
cname    毅联汇业有限公司

bank_noHBLIBIC
ename    HATTON NATIONAL BANK LTD PETTAH BRANCH COLOMBO SRI LANKA
cname    HATTON NATIONAL BANK LTD. SRI LANKA

bank_noHBLIBIC1
ename    HATTON NATIONAL BANK LTD. KANDY BR., SRI LANKA
cname    HATTON NATIONAL BANK LTD. KANDY BR., SRI LANKA

bank_noHBMBKL
ename    HSBC BANK MALAYSIA BERHAD, KUALA LUMPUR
cname    HONGKONG BANK MALAYSIA BERHAD, KUALA LUM

bank_noHBMBMY1
ename    HONGKONG BANK MALAYSIA BERHAD, LABUAN
cname    HONGKONG BANK MALAYSIA BERHAD, LABUAN

bank_noHBMBMY2
ename    HONGKONG BANK MALAYSIA BERHAD,PETALING JAYA,      SELANGOR D.E. MALAYS
         IA
cname    HONGKONG BANK MALAYSIA BERHAD,PETALING JAYA,

bank_noHBNAMA
ename    HAMILTON BANK, N.A. MIAMI,FL. U.S.A.
cname    HAMILTON BANK, N.A. MIAMI,FL. U.S.A.

bank_noHBUA2R
ename    HOLLANDSCHE BANK-UNIE N.V.ROTTERDAM
cname    荷兰联合银行(鹿特丹)

bank_noHBZHK1
ename    HBZ FINANCE LIMITED MAIN OFFICE,HONGKONG
cname    HBZ FINANCE LIMITED MAIN OFFICE,HONGKONG

bank_noHBZKHK
ename    HBZ FINANCE LTD.,KOWLOON BRANCH,HONGKONG
cname    HBZ FINANCE LTD.

bank_noHBZUAD
ename    HABIB BANK AG ZURICH,SHARJAH BR. U.A.E.
cname    HABIB BANK AG ZURICH,SHARJAH BR. U.A.E.

bank_noHBZUBIC
ename    HABIB BANK AG ZURICH,DUBAI,U.A.E.
cname    HABIB BANK AG ZURICH,DUBAI,U.A.E.

bank_noHBZUBU1
ename    HABIB BANK LIMITED, DEIRA BRANCH, DUBAI, UAE
cname    HABIB BANK LIMITED, DEIRA BRANCH, DUBAI, UAE

bank_noHBZUDU
ename    HABIB BANK AG ZURICH MAIN BRANCH DEIRA DUBAI
cname    HABIB BANK AG ZURICH

bank_noHCCBHH
ename    HUA CHIAO COMMERCIAL BANK LTD.,HONGKONG
cname    华侨商业银行(香港)

bank_noHCCBHH1
ename    HUA CHIAO COMM.BANK LTD.HK
cname    HUA CHIAO COMM.BANK

bank_noHCCBHHYA
ename    HUA CHIAO COMMERCIAL BANK LTD., YAUMATEI BRANCH, HONGKONG
cname    HUA CHIAO COMMERCIAL BANK LTD., YAUMATEI

bank_noHCCBHHYM
ename    HUA CHIAO COMMERCIAL BANK LTD., YAUMATEI BRANCH,H.K.
cname    HUA CHIAO COMMERCIAL BANK LTD., YAUMATEI

bank_noHERVBK
ename    BANQUE HERVET S.A. PARIS, FRANCE
cname    BANQUE HERVET S.A. PARIS, FRANCE

bank_noHETSJTA
ename    THE HOKUETSU BANK,LTD., NIIGATA JAPAN
cname    THE HOKUETSU BANK,LTD., NIIGATA JAPAN

bank_noHETSTA
ename    THE HOKUETSU BANK,LTD.,TOKYO,JAPAN
cname    THE HOKUETSU BANK,LTD.,TOKYO,JAPAN

bank_noHGBK
ename    HUNGARIAN FOREIGN TRADE BANK
cname    HUNGARIAN FOREIGN TRADE BANK

bank_noHIGAJT
ename    THE TOKYO HIGASHI SHINKIN BANK, INT'L DIV.TOKYO
cname    THE TOKYO HIGASHI SHINKIN BANK, INT'L DIV.TOKYO

bank_noHIGOJPJT
ename    THE HIGO BANK,LTD.,TOKYO,JAPAN
cname    THE HIGO BANK,LTD.,TOKYO,JAPAN

bank_noHIROJT
ename    HIROSHIMA BANK LIMITED, TOKYO ,JAPAN
cname    HIROSHIMA BANK LIMITED, TOKYO ,JAPAN

bank_noHIROJT1
ename    THE HIROSHIMA BANK, LTD., INTERNATIONAL DIVISION, HIROSHIMA, JAPAN
cname    THE HIROSHIMA BANK, LTD., INTERNATIONAL DIVISION,

bank_noHJGDSAIU
ename    ]OIJHERGOIH                                       [
cname    HUANG

bank_noHKBA PT
ename    HSBC BANK AUSTRALIA LIMITED,PERTH,AUSTRALIA
cname    HSBC BANK AUSTRALIA LIMITED,PERTH,AUSTRALIA

bank_noHKBA2S
ename    HONGKONGBANK OF AUSTRALIA LIMITED
cname    HONGKONGBANK OF AUSTRALIA LIMITED

bank_noHKBAMEL
ename    HSBC BANK AUSTRALIA LTD., MELBOURNE,AUSTRALIA
cname    HSBC BANK AUSTRALIA LTD., MELBOURNE,AUSTRALIA

bank_noHKBASY
ename    HONGKONG OF AUSTRALIA LTD.,SYDNEY
cname    HONGKONG OF AUSTRALIA LTD.

bank_noHKBASYD
ename    HONGKONGBANK OF AUSTRALIA LIMITED.
cname    HONGKONGBANK OF AUSTRALIA LIMITED.

bank_noHKBC
ename   
cname   

bank_noHKBC8V
ename    HONGKONG BANK OF CANADA, VANCOUVER BRANCH, CANADA
cname    HONGKONG BANK OF CANADA, VANCOUVER, CANA

bank_noHKBCAL
ename    HONG KONG BANK OF CANADA,EDMONTON,ALBERTA,CANADA
cname    HONG KONG BANK OF CANADA,EDMONTON,ALBERT

bank_noHKBCCA1
ename    HONGKONG BANK OF CANADA, MONTREAL, CANADA
cname    HONGKONG BANK OF CANADA

bank_noHKBCCA2
ename    HONG KONG BANK OF CANADA SCARBOROUCH BR.,ONTARIO, CANADA
cname    HONG KONG BANK OF CANADA SCARBOROUCH BR.

bank_noHKBCCA3
ename    HONG KONG BANK OF CANADA,MISSISSAUGA BR.,ONTARIO, CANADA
cname    HONG KONG BANK OF CANADA,MISSISSAUGA BR.

bank_noHKBCCA4
ename    HONGKONG BANK OF CANADA,ONTARIO,CANADA
cname    HONGKONG BANK OF CANADA,ONTARIO,CANADA

bank_noHKBCTT
ename    HONGKONG BNAK OF CANADA,TORONTO CANADA
cname    HONGKONG BANK OF CANADA,TORONTO

bank_noHKBK
ename    HOKURIKU BANK LTD.,THE TOKYO JP
cname    HOKURIKU BANK LTD.,THE TOKYO JP

bank_noHKCBKBC
ename    HONGKONG CHINESE BANK LTD., HONG KONG
cname    HONGKONG CHINESE BANK LTD., HOHG KONG

bank_noHKOKTA
ename    THE HOKKOKU BANK,LTD., TOKYO,JAPAN
cname    THE HOKKOKU BANK,LTD., TOKYO,JAPAN

bank_noHLBBSA
ename    HONG LEONG BANK BERHAD, SARAWAK, MALAYSIA
cname    HONG LEONG BANK BERHAD, SARAWAK, MALAYSIA

bank_noHLBK MAL
ename    HONG LEONG BANK BERHAD,KUALA LUMPUR MALAYSIA
cname    HONG LEONG BANK BERHAD,KUALA LUMPUR MALAYSIA

bank_noHNBK3N
ename    HUA NAN COMMERCIAL BANK LTD.,NEW YORK BR.
cname    HUA NAN COMMERCIAL BANK LTD.,NEW YORK BR

bank_noHNBKHH
ename    HUA NAN COMMERCIAL BANK LTD., HONGKONG BRANCH
cname    华南银行香港分行

bank_noHNBKTB
ename    HUA NAN COMMERCIAL BANK,LTD.,TAIPEI,TAIWAN
cname    HUA NAN COMMERCIAL BANK,LTD.,TAIWAN

bank_noHNBNHH
ename    HANA BANK, HONG KONG
cname    HANA BANK, HONG KONG

bank_noHNBNSE
ename    HANA BANK, SEOUL, KOREA
cname    HANA BANK, SEOUL, KOREA

bank_noHNCOHH
ename    HESSE NEWMAN BANK,HAMBURG,F.R. OF GERMANY
cname    HESSE NEWMAN BANK

bank_noHNPBJT
ename    HIGASHI-NIPPON BANK LTD.,TOKYO
cname    HIGASHI-NIPPON BANK LTD.,TOKYO

bank_noHSBB
ename    HANG SENG BANK LIMITED HONG KONG HK
cname    HANG SENG BANK LIMITED HONG KONG HK

bank_noHSBC CAD
ename    HSBC BANK CANADA,TORONTO ONTARIO CANADA
cname    HSBC BANK CANADA,TORONTO ONTARIO CANADA

bank_noHSBC23
ename    THE HONGKONG AND SHANGHAI BANKING CORPORATION LTD HONG KONG.
cname    THE HONGKONG AND SHANGHAI BANKING CORPORATION LTD

bank_noHSBC29
ename    HONGKONG AND SHANGHAI BANKING CORP.LTD.,H.K.
cname    HSBCHH

bank_noHSBC2A
ename    HONGKONG AND SHANGHAI BANKING CORPORATION LIMITED, AUCKLAND, NEW ZEALA
         ND
cname    HONGKONG AND SHANGHAI BANKING CORPORATION LIMITED,

bank_noHSBC33
ename    THE HONGKONG N SHANGHAI BANKING CORP.,LTD.NEW YORK, U.S.A.
cname    香港上海汇丰银行纽约分行

bank_noHSBC331
ename    HSBC BANK USA, NEW YORK, U.S.A.(FORMER MARINE MIDLAND BANK, NY)
cname    HSBC BANK USA, NEW YORK, U.S.A.

bank_noHSBC33A
ename    THE HONG KONG AND SHANGHAI BANKING CORPORATION LTD. NEW YORK
cname    THE HONG KONG AND SHANGHAI BANKING CORPORATION LTD

bank_noHSBC33B
ename    HSBC BANKING CORPORATION, NEW YORK
cname    HSBC BANKING CORPORATION, NEW YORK

bank_noHSBCB
ename    HSBC BANK USA
cname    HSBC BANK USA

bank_noHSBCBA
ename    THE HONGKONG AND SHANGHAI BANKING CORPORATION LTD., BANGALORE, INDIA
cname    汇丰银行,BANGALORE

bank_noHSBCBIC
ename    HONGKONG AND SHANGHAI BANKING CORP.,LTD.,PORTLAND OREGON,U.S.A.
cname    汇丰银行(PORTLAND,OREGON,U.S.A.

bank_noHSBCBK
ename    HONGKONG AND SHANGHAI BANKING CORP.LTD., BANGKOK, THAILAND
cname    汇丰银行,曼谷,泰国

bank_noHSBCBU
ename    HSBC BSNK USA
cname    HSBC BSNK USA

bank_noHSBCDL
ename    THE HONGKONG AND SHANGHAI BANKING CORP. LTD., DALIAN, CHINA
cname    汇丰银行,大连

bank_noHSBCFF
ename    HONGKONG N SHANGHAI BANKING CORP.,LTD., FRANKFURT
cname    HSBC, FRANKFURT,GERMANY

bank_noHSBCHH
ename    HONGKONG AND SHANGHAI BANKING CORPORATION LTD.,   HONG KONG
cname    香港上海汇丰银行 (香港)

bank_noHSBCHH0
ename    THE HONGKONG AND SHANGHAI BANKING CORP. LTD.H.K.TRADE SERVICE DEPT.
cname    汇丰银行(香港)

bank_noHSBCHH1
ename    HONGKONG AND SHANGHAI BANKING CORP.LTD., KOWLOON BRANCH, HONGKONG
cname    香港上海汇丰银行(香港九龙)

bank_noHSBCHH10
ename    HSBC TSD, HONG KONG
cname   

bank_noHSBCHH11
ename    HONGKONG N SHANGHAI BANKING CORP.,LTD. HONG KONG
cname    汇丰银行

bank_noHSBCHH12
ename    THE HONGKONG N SHANGHAI BANKING CORP.,LTD., PATERSON STREET BRANCH, HO
         NGKONG
cname    汇丰 Paterson St., Branch, H.K.

bank_noHSBCHH13
ename    THE HONGKONG N SHANGHAI BANKING CORP.,LTD., LAI CHI KOK ROAD OFFICE, H
         ONGKONG
cname    汇丰 LAI CHI KOK RAOD OFFICE, H.K.

bank_noHSBCHH14
ename    THE HONGKONG N SHANGHAI BANKING CORP.,LTD. ADMIRALTY BRANCH, HONGKONG
cname    THE HONGKONG BANK, ADMIRALTY BRANCH,H.K.

bank_noHSBCHH15
ename    THE HONGKONG N SHANGHAI BANKING CORP.,LTD., CHEUNGSHA WAN BRANCH, HONG
         KONG
cname    HSBC CHEUNG SHA WAN BRANCH, HONGKONG

bank_noHSBCHH16
ename    THE HONGKONG N SHANGHAI BANKING CORP.,LTD., ELECTRIC ROAD OFFICE, HONG
         KONG
cname    HSBC ELECTRIC ROAD OFFICE HONGKONG

bank_noHSBCHH17
ename    HONGKONG N SHANGHAI BANKING CORP.,LTD., KOWLOON,HONG KONG
cname   

bank_noHSBCHH18
ename    HONGKONG N SHANGHAI BANKING CORP.,LTD., HAY WAH BUILDING BRANCH, WANCH
         AI, HONGKONG
cname    HSBC HAY WAH BUILDING BRANCH, HONGKONG

bank_noHSBCHH19
ename    HONGKONG N SHANGHAI BANKING CORP.,LTD., DES VOEUX ROAD WEST BRANCH, HO
         NGKONG
cname    HSBC DES VOEUX ROAD WEST BRANCH, H.K.

bank_noHSBCHH2
ename    HONGKONG AND SHANGHAI BANKING CORP. LTD.,HONG KONG
cname    香港上海汇丰银行(香港)

bank_noHSBCHH20
ename    THE HONGKONG AND SHANGHAI BANKING CORP.,LTD., SHATIN N.T. HONG KONG
cname    汇丰银行(沙田)

bank_noHSBCHH21
ename    THE HONGKONG AND SHANGHAI BANKING CORP.LTD.,      IMPORTS DEPARTMENT
cname   

bank_noHSBCHH22
ename    THE HONGKONG AND SHANGHAI BANKING CORP.LTD.       TSD CBC OFFICE (I/E
         DEPT TEAM 6)
cname    汇丰银行

bank_noHSBCHH23
ename    THE HONGKONG AND SHANGHAI BANKING CORPORATION LIMITED, HONG KONG
cname    THE HONGKONG AND SHANGHAI BANKING CORPORATION LIMI

bank_noHSBCHH24
ename    THE HONGKONG AND SHANGHAI BANKING CORPORATION LIMITED, TUEN MUN, HONG
         KONG
cname    THE HONGKONG AND SHANGHAI BANKING CORPORATION LIMI

bank_noHSBCHH25
ename    HONG KONG & SHANGHAI BANKING CORP.LTD., HONG KONG
cname    汇丰银行集团香港

bank_noHSBCHH26
ename    HONG KONG & SHANGHAI BANKING CORP.LTD., HONG KONG
cname    汇丰银行集团香港

bank_noHSBCHH27
ename    HONGKONG AND SHANGHAI BANKING CORPORATION LIMITED., HONG KONG
cname    HONGKONG AND SHANGHAI BANKING CORPORATION LIMITED.

bank_noHSBCHH28
ename    THE HONGKONG AND SHANGHAI BANKING CORP. LTD.,HONG KONG
cname    THE HONGKONG AND SHANGHAI BANKING CORP. LTD.,HONG

bank_noHSBCHH29
ename    THE HONGKONG AND SHANGHAI BANKING CORP. LTD.,HONG KONG OFFICE
cname    THE HONGKONG AND SHANGHAI BANKING CORP. LTD.,HONG

bank_noHSBCHH3
ename    HONG KONG AND SHANGHAI BANKING CORP.LTD.,NAM LONG SHANG ROAD BRANCH.,H
         ONGKONG
cname    香港上海汇丰银行(NAM LONG SHAN RD)

bank_noHSBCHH4
ename    HONGKONG AND SHANGHAI BANKING CORP. LTD.,TSD CBC
cname    香港上海汇丰银行(TSD CBC)

bank_noHSBCHH5
ename    HONGKONG AND SHANGHAI BANKING CORP. LTD., MONGKOK OFFICE, KOWLOON, HON
         G KONG
cname    香港上??惴?银行(MONGKOK OFFICE九龙)

bank_noHSBCHH6
ename    HONGKONG AND SHANGHAI BANKING CORPORATION LTD., HONG KONG
cname    香港上海汇丰银行(香港)

bank_noHSBCHH7
ename    THE HONGKONG AND SHANGHAI BANKING CORP LTD.,H.K.
cname    汇丰银行(TAI YAU STREET),香港.

bank_noHSBCHH8
ename    HONGKONG N SHANGHAI BANKING CORP.,LTD.,         NORTH POINT BRANCH,
         H.K.
cname    汇丰银行(香港 NORTH POINT BRANCH)

bank_noHSBCHH9
ename    HONGKONG AND SHANGHAI BANKING CORP. LTD.          HONG KONG.
cname    汇丰银行(TAI PO)

bank_noHSBCHONG
ename    THE HONGKONG AND SHANGHAI BANKING CORPORATION LIMITED.
cname    THE HONGKONG AND SHANGHAI BANKING CORPORATION LIMI

bank_noHSBCJA
ename    THE HONGKONG AND SHANGHAI BANKING CORP. LTD.      JAKARTA BR. INDONESI
         A
cname    THE HONGKONG AND SHANGHAI BANKING CORP. LTD.

bank_noHSBCJT
ename    HONGKONG N SHANGHAI BANKING CORP.LTD.,TOKYO,JAPAN
cname    香港上海汇丰银行业(东京)

bank_noHSBCKL
ename    THE HONGKONG N SHANGHAI BANKING CORP.,LTD.      KUALA LUMPUR, MALAYS
         IA
cname    THE HONGKONG N SHANGHAI BANKING CORP.,LTD.

bank_noHSBCL
ename    HONGKONG AND SHANGHAI BANKING CORPORATION LIMITED, THE HONGKONG BANK B
         UILDING,HONGKONG.
cname    HONGKONG AND SHANGHAI BANKING CORPORATION LIMITED,

bank_noHSBCLD
ename    HONGKONG SHANGHAI BANKING CORP LTD, HK
cname    HONGKONG AND SHANGHAI BANKING CORPORATION LIMITED,

bank_noHSBCLO1
ename    THE HONG KONG AND SHANGHAI BANKING CORP.
cname    THE HONG KONG AND SHANGHAI BANKING CORP.

bank_noHSBCME
ename    THE HONGKONG AND SHANGHAI BANKING CORPORATION LTD.MEDAN, INDONESIA
cname    THE HONGKONG AND SHANGHAI BANKING CORPORATION LTD.

bank_noHSBCMI
ename    HSBC TRADE SERVICES MIDLAND BANK PLC. INT'L BR.
cname    HSBC TRADE SERVICES MIDLAND BANK PLC. INT'L BR.

bank_noHSBCMX
ename    HONGKONG AND SHANGHAI BANKING CORP. LTD.,MACAU
cname    香港上海汇丰银行(澳门)

bank_noHSBCNY
ename    HONGKONG AND SHANGHAI BANKING CORP LTD.,NEW YORK
cname    HONGKONG AND SHANGHAI BANKING CORP LTD.,NEW YORK

bank_noHSBCSA
ename    HSBC BANK MALAYSIA BERHAD, SARAWAK, MALAYSIA
cname    HSBC BANK MALAYSIA BERHAD, SARAWAK, MALAYSIA

bank_noHSBCSB
ename    HSBC BANK MALAYSIA BERHAD, SABAH, MALAYSIA
cname    汇丰银行, SARAWAK, 马来西亚

bank_noHSBCSE
ename    HONGKONG AND SHANGHAI BANKING CORPORATION LIMITED,SEOUL, KOREA
cname    汇丰银行汉城分行

bank_noHSBCSG
ename    HONGKONG AND SHANGHAI BANKING CORP.,SINGAPORE
cname    香港汇丰银行(新加坡)

bank_noHSBCSG1
ename    HONGKONG AND SHANGHAI BANKING CORPORATION LTD., JURONG BRANCH, SINGAPO
         RE
cname    汇丰银行(JURONG BR.)

bank_noHSBCSG2
ename    HONGKONG AND SHANGHAI BANKING CORPORATION LTD., SERANGOON GARDEN BRANC
         H, SINGAPORE
cname    HONGKONG AND SHANGHAI BANKING CORPORATION LTD., SE

bank_noHSBCSG3
ename    THE HONGKONG N SHANGHAI BANKING CO.,LTD., SINGAPORE
cname    汇丰银行(新加坡)

bank_noHSBCSGSA
ename    HONGKONG N SHANGHAI BANKING CORP.,LTD.,SINGAPORE AREA MANAGEMENT OFFIC
         E
cname    HSBC SINGAPORE AREA MANAGEMENT OFFICE

bank_noHSBCSH
ename    HONGKONG AND SHANGHAI BANKING CORPORATION LTD.,SHANGHAI BRANCH,CHINA
cname    HONGKONG AND SHANGHAI BANKING CORP.,LTD.

bank_noHSBCST
ename    THE HONGKONG AND SHANGHAI BANKING CORP. LTD., SEATTLE, U.S.A.
cname    汇丰银行,西雅图

bank_noHSBCSY
ename    HSBC BANK AUSTRALIA LIMITED,H.O.,SYDNEY,AUSTRALIA
cname    HSBC BANK AUSTRALIA LIMITED,H.O.,SYDNEY,AUSTRALIA

bank_noHSBK
ename    HSBC BANK PLC LONDON USD CLEARING INTERNATIONAL   DIVISION
cname    HSBC BANGKOK

bank_noHSIN
ename    HSIN CHU INTERNATIONAL BANK
cname    HSIN CHU INTERNATIONAL BANK

bank_noHSINJK
ename    THE MINATO BANK LTD. (FORMERLY HANSHIN BANK LTD.), KOBE, JAPAN
cname    THE MINATO BANK LTD. KOBE, JAPAN

bank_noHSINJK1
ename    HANSHIN BANK LTD.,KOBE JAPAN
cname    阪神银行(神户)

bank_noHTAK33
ename    HOKKAIDO TAKUSHOKU BANK LTD.,NEW YORK
cname    北海道拓殖银行(纽约)

bank_noHTAKBIC
ename    THE HOKKAIDO TAKUSHOKU BANK YOKOHAMA BRANCH,JAPAN
cname    HOKKAIDO TAKUSHOKU YOKOHAMA BR.,JAPAN

bank_noHTAKJT
ename    HOKKAIDO TAKUSHOKU BANK LTD.,SAPPORO,JAPAN
cname    北海道拓殖银行(札幌)

bank_noHTAKJT1
ename    HOKKAIDO TAKUSHOKU BANK LTD.,TOKYO
cname    北海道拓殖银行(东京)

bank_noHTAKJTA
ename    THE HOKKAIDO TAKUSHOKU BANK LTD., INT'L BANKING   DIVISION, TOKYO JAPA
         N
cname    北海道

bank_noHUAXBJ
ename    HUA XIA BANK
cname    HUA XIA BANK

bank_noHUNT33
ename    HUNTINGTION NATIONAL BNAK., COLUMBUS,OH,U.S.A.
cname    HUNTINGTION NAT'L BANK

bank_noHVBK33
ename    HANVIT BANK, NEW YORK, U.S.A.
cname    HANVIT BANK, NEW YORK, U.S.A.

bank_noHVBKBU
ename    HANVIT BANK LTD., BUSAN, KOREA
cname    HANVIT BANK LTD., BUSAN, KOREA

bank_noHVBKJA
ename    BANK HANVIT INDONESIA(FORMERLY BANK KOREA COMMERCIAL SURYA), JAKARTA,
         INDONESIA
cname    BANK HANVIT INDONESIA(FORMERLY BANK KOREA COMMERCI

bank_noHVBKSE
ename    HANVIT BANK, SEOUL, KOREA
cname    HANVIT BANK, SEOUL, KOREA

bank_noHVBKSE1
ename    HANVIT BANK, MYUN MOK DONG BR. SEOUL, KOREA
cname    HANVIT BANK, MYUN MOK DONG BR. SEOUL,KOR

bank_noHVBKSH
ename    HANVIT BANK, SHANGHAI BRANCH, CHINA
cname    HANVIT BANK, SHANGHAI BRANCH, CHINA

bank_noHYAKJT
ename    THE HYAKUJUSHI BANK,LTD. INTERNATIONAL DIVISION
cname    THE HYAKUJUSHI BANK, LTD. INTERNATIONAL

bank_noHYAKUTO
ename    THE HYAKUJUSHI BANK,LTD.,
cname    HYAKUJUSHI BANK,LTD.,

bank_noHYGBJK
ename    HYOGO BANK LTD., INT'L OPERATION CENTER KOBE,JAPAN
cname    HYOGO BANK LTD., INT'L OPERATION CENTER

bank_noHYGBJK1
ename    THE HYOGO BANK LTD.,KOBE,JAPAN
cname    THE HYOGO BANK LTD.,KOBE,JAPAN

bank_noHYGBJK2
ename    THE MIDORI BANK, LTD.
cname    THE MIDORI BANK, LTD.

bank_noHYGBJS
ename    THE HYOGO BANK LTD.,OSAKA BRANCH
cname    THE HYOGO BANK LTD.,OSAKA BRANCH

bank_noHYPO
ename    BAYERISCHE HYPO-UND VEREINSBANK AG., HONG KONG    BRANCH
cname    德国裕宝联合银行,香港

bank_noHYVE407
ename    BAYERISCHE HYPO-UND VEREINSBANK AG,ASCHAFFENBURG
cname    BAYERISCHE HYPO-UND VEREINSBANK AG,POSTFACH 78,

bank_noHYVE414
ename    BAYERISCHE HYPO-UND VEREINSBANK AG, DUSSELDORF, GERMANY
cname    BAYERISCHE HYPO-UND VEREINSBANK AG, DUSSELDORF, GE

bank_noHYVEMA
ename    BAYERISCHE HYPO-UND VEREINSBANK AG.AUGSBURG
cname    BAYERISCHE HYPO-UND VEREINSBANK AG.AUGSBURG

bank_noHYVEMMA
ename    BAYERISCHE HYPO-UND VEREINSBANK AG,WIESBADEN
cname    BAYERISCHE HYPO-UND VEREINSBANK AG,WIESBADEN

bank_noHYVEPP
ename    HYPOVEREINSBANK CZ A.S., PRAGUE, CZECH REPUBLIC
cname    HYPOVEREINSBANK CZ A.S., PRAGUE, CZECH REPUBLIC

D2002 发表于 2015-01-30 09:50

还有另一种解决方式,将数据库NLS设置成UTF-8编码,然后在网页编码也设置成UTF-8, 这样不存在转码问题了

liaosnet 发表于 2015-01-30 09:51

回复 6# D2002


只显示错误的数据出来就好~~没问题的不用理会,一般情况下:如果是部分乱码,可能的原因是不常用汉字的原因。

D2002 发表于 2015-02-04 09:37

liaosnet 发表于 2015-01-30 09:51 static/image/common/back.gif
回复 6# D2002




同样搭配了连接DB2的例子,DB2上的数据库采用码制是1386,JSP上采用UTF-8, 那样不用考虑转码,处理汉字很容易,貌似比Informix容易。

viva2011 发表于 2015-02-04 14:42

informix高级开发工程师(25-40万)

QQ:1178414374

工作地点:北京

岗位职责:负责informix数据库产品开发工作。

岗位要求:

1、5年以上Informix数据库设计、开发、调优经验。

2、熟悉Informix的安装、调试和运维管理工作,

3、熟悉主流中间件产品管理及安装配置、备份和性能调优;

4、熟悉IBM AIX/HP-UX/Solaris UNIX/系统平台;
页: [1]
查看完整版本: JSP中从Informix数据库得到的汉字乱码(老问题已解决,出现新问题)