Hi,
the encoding of special characters in the UserId and Password property of the PsSqlConnection seems to be wrong:
If i use for example the german special character 'Ä' in these fields, the PgSql connector sends 0x3F to the server, which is ASCII encoding.
It should be 0xC4 in Unicode.
As a result you can't login with special characters in your UserId or Password field.
If I try this with pgAdmin III, everything works fine.
- PgSql Version 3.25.20
- PsSqlConnection.Unicode = true
- PostgreSQL 8.2.4
- Database encoding = UTF8
Thanks for your help
Wrong encoding of PsSqlConnection login credentials
The new build of dotConnect for PostgreSQL 4.50.33 is available for download now.
It can be downloaded from http://www.devart.com/dotconnect/postgr ... nload.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=14911 .
It can be downloaded from http://www.devart.com/dotconnect/postgr ... nload.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=14911 .
I tried to verify that this bug is resolved, but it is still there!
I used:
- dotConnect 4.90.124.0 TRIAL
- PostgreSQL 8.2.4
- Database encoding = UTF8
Steps to reproduce the error:
1) Create PostgreSQL role (User "Äaaaa" Password "secret"):
CREATE ROLE "Äaaaa" LOGIN ENCRYPTED PASSWORD 'md54234ca052fc626494c0a3ecf0dbc70f2' NOSUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE;
2) Login from pgAdmin:
-> OK
3) Login from code:
Devart.Data.PostgreSql.PgSqlConnection conn = new Devart.Data.PostgreSql.PgSqlConnection();
conn.Unicode = true;
conn.Host = "192.168.1.1";
conn.Port = 5432;
conn.UserId = "Äaaaa";
conn.Password = "secret";
conn.Database = "postgres";
conn.Open();
-> password authentication failed for user "?aaaa"
The byte sequence for the user name which is sent by your PgSqlConnection is:
0x3f 0x61 0x61 0x61
It should be (like pgAdmin sends it):
0xc3 0x84 0x61 0x61 0x61
The same problem exists, if you use special characters for the password.
So this error still exists?!
Regards,
kww
I used:
- dotConnect 4.90.124.0 TRIAL
- PostgreSQL 8.2.4
- Database encoding = UTF8
Steps to reproduce the error:
1) Create PostgreSQL role (User "Äaaaa" Password "secret"):
CREATE ROLE "Äaaaa" LOGIN ENCRYPTED PASSWORD 'md54234ca052fc626494c0a3ecf0dbc70f2' NOSUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE;
2) Login from pgAdmin:
-> OK
3) Login from code:
Devart.Data.PostgreSql.PgSqlConnection conn = new Devart.Data.PostgreSql.PgSqlConnection();
conn.Unicode = true;
conn.Host = "192.168.1.1";
conn.Port = 5432;
conn.UserId = "Äaaaa";
conn.Password = "secret";
conn.Database = "postgres";
conn.Open();
-> password authentication failed for user "?aaaa"
The byte sequence for the user name which is sent by your PgSqlConnection is:
0x3f 0x61 0x61 0x61
It should be (like pgAdmin sends it):
0xc3 0x84 0x61 0x61 0x61
The same problem exists, if you use special characters for the password.
So this error still exists?!
Regards,
kww
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
We've fixed the problem with connecting to PostgreSQL database as a user with Unicode name. The fix is available in the latest 4.95.146 build of dotConnect for PostgreSQL. The build can be downloaded from
http://www.devart.com/dotconnect/postgr ... nload.html
(the trial version) or from Registered Users' Area:
http://secure.devart.com/
For more information on improvements and fixes available in dotConnect for PostgreSQL 4.95.146, please refer to
http://www.devart.com/forums/viewtopic.php?t=18426
http://www.devart.com/dotconnect/postgr ... nload.html
(the trial version) or from Registered Users' Area:
http://secure.devart.com/
For more information on improvements and fixes available in dotConnect for PostgreSQL 4.95.146, please refer to
http://www.devart.com/forums/viewtopic.php?t=18426