Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id C005A9FB1E7 for ; Tue, 23 Oct 2007 20:34:55 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 45898-07 for ; Tue, 23 Oct 2007 20:34:50 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 0D5719FA52C for ; Tue, 23 Oct 2007 20:34:50 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l9NNXXi3005902; Tue, 23 Oct 2007 19:33:33 -0400 (EDT) To: Oliver Jowett cc: =?UTF-8?B?TGl1WWFuIOWImOeglA==?= , pgsql-jdbc@postgresql.org Subject: Re: Chinese database name in URL, can I ? In-reply-to: <471E8085.8030308@opencloud.com> References: <13366356.post@talk.nabble.com> <19162.1193155189@sss.pgh.pa.us> <471E8085.8030308@opencloud.com> Comments: In-reply-to Oliver Jowett message dated "Wed, 24 Oct 2007 12:15:17 +1300" Date: Tue, 23 Oct 2007 19:33:33 -0400 Message-ID: <5901.1193182413@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/126 X-Sequence-Number: 17698 Oliver Jowett writes: > Tom Lane wrote: >> 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. > Has something changed here so that non-7-bit data in the startup packet > will work? The server just thinks those are 8-bit strings. I guess my recommendation is that you should go ahead and send UTF8, and if the user created the non-ASCII name that way, it'll work. (In practice I think that means he'd have to issue the CREATE DATABASE or CREATE USER command while logged into a database that uses UTF8 encoding.) This whole business of per-database encodings is a mess, of course. regards, tom lane