X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DD8625643C for ; Sun, 13 Mar 2005 01:58:24 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 44981-03 for ; Sun, 13 Mar 2005 01:58:15 +0000 (GMT) Received: from mail.idsignet.com (unknown [211.152.35.130]) by svr1.postgresql.org (Postfix) with ESMTP id DF0F452A72 for ; Sun, 13 Mar 2005 01:58:12 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by mail.idsignet.com (Postfix) with ESMTP id 608A77980A8; Sun, 13 Mar 2005 09:58:11 +0800 (CST) Received: from mail.idsignet.com ([127.0.0.1]) by localhost (masterzo.idsignet.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 32041-10; Sun, 13 Mar 2005 09:58:10 +0800 (CST) Received: from cerberus.idsignet.com (unknown [192.168.10.200]) by mail.idsignet.com (Postfix) with ESMTP id B281D7980A2; Sun, 13 Mar 2005 09:58:10 +0800 (CST) Subject: Re: Unicode! From: Chen Shaopeng Reply-To: chen_shaopeng@idsignet.com To: star star Cc: pgsql-admin@postgresql.org In-Reply-To: <20050311012012.61766.qmail@web53706.mail.yahoo.com> References: <20050311012012.61766.qmail@web53706.mail.yahoo.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-B6nlR9JaPqsgbySxAoPB" Organization: IDSignet Date: Wed, 16 Mar 2005 02:52:04 -0500 Message-Id: <1110959524.2021.13.camel@cerberus.idsignet.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.3 X-Virus-Scanned: by amavisd-new at idsignet.com X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=2.296 tagged_above=0 required=5 tests=DATE_IN_FUTURE_48_96 X-Spam-Level: ** X-Archive-Number: 200503/192 X-Sequence-Number: 16690 --=-B6nlR9JaPqsgbySxAoPB Content-Type: text/plain; charset=GB18030 Content-Transfer-Encoding: quoted-printable Since you used Java JDBC to insert the data into PostgreSQL, can you also JDBC to pull it out back and see if you get the right data back? If not, then your database encoding is probably the error. You need to set the DB encoding properly. If you can get your data back to the correct encoding, then check the environment settings of your pgadmin III. I don't quite remember which version of pgadmin always gave me that problem too when I used it in chinese environment. My data in the DB is correct, and I can get it back in the right encoding, but pgadmin just does not display correctly, even though other applications running in the same environment settings can display unicode correctly. Not sure if you are running Linux or Windows. If you run Linux, you can set your environments to UTF-8, then connect to the DB with psql, and display the contents of your data. If your data are in unicode, you should see the display correctly. csp =D4=DA 2005-03-10=CB=C4=B5=C4 17:20 -0800=A3=ACstar star=D0=B4=B5=C0=A3=BA > I use PostgreSQL 8! >=20 > I have 2 file:=20 > =20 > insert.htm > > > Untitled Document > > > >
> > >
> > > =20 > postgre_insert.jsp > <%@ page contentType=3D"text/html; charset=3Dutf-8" import=3D"java.sql.*= " > errorPage=3D"" %> > <%=20 > String username=3Drequest.getParameter("username"); > String str=3D"insert into user_table values('"+username+"','try')";=20 > Class.forName("org.postgresql.Driver");=20 > String url =3D "jdbc:postgresql://localhost:5432/try";=20 > Connection conn =3D DriverManager.getConnection(url, "postgres", > "pass");=20 > PreparedStatement s =3D conn.prepareStatement(str); > s.executeUpdate();=20 > out.println("OK"); > %> > I input "Ti=816=835ng Vi=816=843t" on textfield and click Submit button. = Insertion > is successed. > But, when i view data in pgAdmin III(version 1.2.0), data is " Ting > Vi=816=A60t ".=20 > Can you help me!? >=20 --=20 =B3=C2=C9=D9=C5=F4 Chen Shaopeng =C9=CF=BA=A3=C1=FA=B7=BD=D0=C5=CF=A2=BC=BC=CA=F5=D3=D0=CF=DE=B9=AB=CB=BE http://www.idsignet.com --=-B6nlR9JaPqsgbySxAoPB Content-Type: application/pgp-signature; name=signature.asc Content-Description: =?UTF-8?Q?=E8=BF=99=E6=98=AF=E4=BF=A1=E4=BB=B6=E7=9A=84=E6=95=B0?= =?UTF-8?Q?=E5=AD=97=E7=AD=BE=E5=90=8D=E9=83=A8?= =?UTF-8?Q?=E5=88=86?= -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQBCN+WkbEMvPqQdkRgRAliNAJ4yHcmv6F1zIDrTpKuGLlUpF7ZzCwCeKg/q GXGZ/3U+D/+pNXMoNesLiWs= =X+hr -----END PGP SIGNATURE----- --=-B6nlR9JaPqsgbySxAoPB--