Received: from maia.hub.org (maia-4.hub.org [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 861BA632693 for ; Mon, 17 May 2010 23:29:41 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 91738-01 for ; Tue, 18 May 2010 02:29:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.postnewspapers.com.au (202-89-185-120.static.dsl.amnet.net.au [202.89.185.120]) by mail.postgresql.org (Postfix) with ESMTP id 353586325C8 for ; Mon, 17 May 2010 23:29:33 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by mail.postnewspapers.com.au (Postfix) with ESMTP id 6E803AE7F1; Tue, 18 May 2010 10:29:04 +0800 (WST) X-Virus-Scanned: Debian amavisd-new at postnewspapers.com.au Received: from mail.postnewspapers.com.au ([127.0.0.1]) by localhost (mail.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id peI0ghb8iNRQ; Tue, 18 May 2010 10:28:59 +0800 (WST) Received: from [10.1.1.7] (124-148-217-247.dyn.iinet.net.au [124.148.217.247]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Craig Ringer", Issuer "POST Certificate Authority" (verified OK)) by mail.postnewspapers.com.au (Postfix) with ESMTPSA id 38356AE791; Tue, 18 May 2010 10:28:59 +0800 (WST) Message-ID: <4BF1FB5E.4070005@postnewspapers.com.au> Date: Tue, 18 May 2010 10:28:46 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: "Sarkar, Sudipta" CC: "pgsql-jdbc@postgresql.org" Subject: Re: Connection fails when the user name contains chinese characters References: <2FB1D66ABE14B141BCF3DD40A3D95AD113CFA24BA1@PHXCCRPRD01.adprod.bmc.com> In-Reply-To: <2FB1D66ABE14B141BCF3DD40A3D95AD113CFA24BA1@PHXCCRPRD01.adprod.bmc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201005/41 X-Sequence-Number: 20525 On 18/05/2010 4:02 AM, Sarkar, Sudipta wrote: > connProp.put("user", "\u6cf0\u5c71"); //Set the user name. Need to use > Unicode escaped since it contains non ascii characters What character encoding are your source files in? You should be able to write normal UTF-8 encoded text so long as your compiler/IDE knows that those are UTF-8 source files. > My jdbc version is 8.3-603 and my database encoding is UTF-8. Maybe try the latest JDBC driver (701), just to make sure it's not an old issue... -- Craig Ringer