Re: Chinese database name in URL, can I ?

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: LiuYan 刘研 <lovetide(at)21cn(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Chinese database name in URL, can I ?
Date: 2007-10-23 23:15:17
Message-ID: 471E8085.8030308@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Tom Lane wrote:
> =?UTF-8?Q?LiuYan_=E5=88=98=E7=A0=94?= <lovetide(at)21cn(dot)com> 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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tom Lane 2007-10-23 23:33:33 Re: Chinese database name in URL, can I ?
Previous Message Heikki Linnakangas 2007-10-23 18:13:53 Re: "Something unusual has occured" error using PostgreSQL 8.2 with Apache Commons DBCP 1.2.2