Re: I can't insert the chinese words.

From: Vernon Wu <vernonw(at)gatewaytech(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org, dauw <dauw(at)ms9(dot)url(dot)com(dot)tw>
Subject: Re: I can't insert the chinese words.
Date: 2003-02-23 18:02:42
Message-ID: C821YULI6WVQPUSNYU835275NKE04Y.3e590cc2@kimiko
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


Your email was some days ago. I don't know whether you have resolved this issue or not.

I'm using the PostgreSQL with its JDBC driver (both 7.2.1 and 7.3 ) to store English and Chinese. Do you have the
encoding set in the DB? If so, do you have the string encoded as the same as the one in DB?

18/02/2003 1:25:07 AM, dauw <dauw(at)ms9(dot)url(dot)com(dot)tw> wrote:

>Hello all,
>I use the "(2003-02-09) JDBC3 JDK 1.4" JDBC driver to access the DB.
>When I insert the chinese words (local= zh_TW ,"BIG5") into the varchar
>column,it become "???".
>But if I use the pgAdmin to do so ,It is success.
>
>Then I select the ResultSet, The getString() mathod could not get the
>correct words.
>But if I use the sentence " String s =new String(rs.getBytes());" ,The
>string s is correct.
>
>I guess that is caused by char= 16-bit in java2.
>
>Now how can I insert the chinese words (local= zh_TW ,"BIG5") into the
>varchar column by jdbc?
>
>regard
>
>---------
>OS: windows XP
>JavaVM: j2sdk 1.4.1
>JDBC :JDBC3
>pssql:PostgreSQL 7.3.1
>
> ---Dauw
>dauw(at)ms9(dot)url(dot)com(dot)tw
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
>subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
>message can get through to the mailing list cleanly
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Vernon Wu 2003-02-23 18:05:52 Re: ConnectionPool howto??
Previous Message Dave Cramer 2003-02-23 15:07:09 Re: column name not found