Received: from ext04.sra.co.jp (IDENT:root@ykh28DS26.kng.mesh.ad.jp [133.205.214.26]) by hub.org (8.9.3/8.9.3) with ESMTP id VAA13142 for ; Mon, 15 Nov 1999 21:34:17 -0500 (EST) (envelope-from t-ishii@ext04.sra.co.jp) Received: from ext04.sra.co.jp (t-ishii@localhost [127.0.0.1]) by ext04.sra.co.jp (8.8.8/8.8.8) with ESMTP id LAA01285; Tue, 16 Nov 1999 11:26:54 +0900 Message-Id: <199911160226.LAA01285@ext04.sra.co.jp> To: "Ashish Sharma" cc: pgsql-interfaces@postgreSQL.org Subject: Re: [INTERFACES] Japanese, Java and Postgres From: Tatsuo Ishii Reply-To: t-ishii@sra.co.jp In-reply-to: Your message of Tue, 16 Nov 1999 02:36:57 +0900. <000901bf2f90$03e83950$a200a8c0@toasia.co.jp> Date: Tue, 16 Nov 1999 11:26:53 +0900 Sender: t-ishii@ext04.sra.co.jp > I have a Java applet (1.1.5) running on win9x/IE/Netscape, > using which the user can enter Japanese charactors. > > On the backend (RedHat 5.2 Japanese), I just installed postgresql 6.5 with > > ./configure --enable-locale --with-mb=UNICODE --with-odbc I assume you are going to use English and Japanese only. In this case I would recommend: ./configure --with-mb=EUC_JP --with-odbc > And then I compiled the JDBC bridge. ~~~~~~~~~~~ Isn't this JDBC driver, right? > Now, when I insert some Japanese charactors in the DB and select it back, > I get ??? marks. > > What I'm missing?? I'm not doing any encoding stuff programmatically... > > Please help me, and don't force me to go back to SQL Server !! The JDBC driver coming with PostgreSQL does not understand what encoding is used in database. So you should explicitly tell it that you want to use Japanese. You need set the user.language property to "ja" and the file.encoding property to "EUCJIS". For a stand alone Java application you could do that: $ java -Duser.language=ja -Dfile.encoding=EUCJIS Your_class_name I recommend you try with a stand alone Java application first. Applets sometimes make things more difficult because of JVM problems etc. --- Tatsuo Ishii