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

Re: Connection fails when the user name contains chinese characters

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: "Sarkar, Sudipta" <Sudipta_Sarkar(at)bmc(dot)com>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Connection fails when the user name contains chinese characters
Date: 2010-05-18 02:28:46
Message-ID: 4BF1FB5E.4070005@postnewspapers.com.au (view raw or flat)
Thread:
Lists: pgsql-jdbc
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

In response to

pgsql-jdbc by date

Next:From: Thomas KellererDate: 2010-05-18 09:29:37
Subject: JDBC Driver and timezones
Previous:From: Sarkar, SudiptaDate: 2010-05-17 20:02:21
Subject: Connection fails when the user name contains chinese characters

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