Skip site navigation (1) Skip section navigation (2)

Re: Chinese database name in URL, can I ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
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:33:33
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
Oliver Jowett <oliver(at)opencloud(dot)com> 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

In response to

pgsql-jdbc by date

Next:From: Albe LaurenzDate: 2007-10-24 07:18:07
Subject: Re: "Something unusual has occured" error using PostgreSQL 8.2 with Apache Commons DBCP 1.2.2
Previous:From: Oliver JowettDate: 2007-10-23 23:15:17
Subject: Re: Chinese database name in URL, can I ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group