Hi,
I have postgreSQL database (server & database encoding - utf-8. Version - 8.3)
I've created the login with the Cyrilic symbols (f.e. "Иванов").
When I'm tryin' to connect using JDBC I'm receving the exception:
{code}
org.postgresql.util.PSQLException: FATAL: password authentication failed for user "??????"
at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:276)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:95)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:124)
at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
at org.postgresql.Driver.makeConnection(Driver.java:386)
at org.postgresql.Driver.connect(Driver.java:260)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
{code}
My code is:
{code}
Properties connectionProperties = new Properties();
connectionProperties.setProperty("user", userName);
connectionProperties.put("charSet", "utf-8");
connectionProperties.setProperty("password", userPassword);
try {
connection = DriverManager.getConnection(connectionString, connectionProperties);
} catch (SQLException e) {
e.printStackTrace();
}{code}
When I'm tryin' to connect using UTF-8 decoded name: Р?ванов I'm receiving the same exception, but another client tool (EMS SQL Manager) works with second login.
Can some body tell me what's wrong?
Thanks, Andrew.