Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 6DEC89FA167 for ; Tue, 23 Oct 2007 20:15:48 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 63204-02-3 for ; Tue, 23 Oct 2007 20:15:37 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from tremor.opencloud.co.nz (tremor.opencloud.co.nz [131.203.101.230]) by postgresql.org (Postfix) with ESMTP id 8B0299F9F52 for ; Tue, 23 Oct 2007 20:15:36 -0300 (ADT) Received: from 222-154-138-58.jetstream.xtra.co.nz ([222.154.138.58] helo=[10.1.1.3]) by tremor.opencloud.co.nz with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1IkSy3-0000pU-Sw; Wed, 24 Oct 2007 12:15:24 +1300 Message-ID: <471E8085.8030308@opencloud.com> Date: Wed, 24 Oct 2007 12:15:17 +1300 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Tom Lane CC: =?UTF-8?B?TGl1WWFuIOWImOeglA==?= , pgsql-jdbc@postgresql.org Subject: Re: Chinese database name in URL, can I ? References: <13366356.post@talk.nabble.com> <19162.1193155189@sss.pgh.pa.us> In-Reply-To: <19162.1193155189@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/125 X-Sequence-Number: 17697 Tom Lane wrote: > =?UTF-8?Q?LiuYan_=E5=88=98=E7=A0=94?= writes: >> I've also tried add '&charSet=GBK' in the jdbcURL, and got the same result. > > At a guess, the name of the database will have to be in UTF8. I doubt > that JDBC will think it should do any character set conversion on it. IIRC the last time I raised the issue of the encoding used for things like database names & usernames in the startup packet the answer boiled down to "don't use anything but 7-bit ASCII". So the driver sends those strings as 7-bit ASCII (i.e. String.getBytes("US-ASCII")). If you've got a database name or username that can't be represented using only 7-bit ASCII, you're out of luck. Has something changed here so that non-7-bit data in the startup packet will work? -O