2

In Postgres psqlodbc driver using special characters in connection string password like

sqlstringconnect('DRIVER={PostgreSQL Unicode};PWD=pü')

or in url encoded form

sqlstringconnect('DRIVER={PostgreSQL Unicode};PWD=p%C3%BC')

throws password error.

According to

https://www.postgresql-archive.org/Problem-with-special-characters-in-password-when-using-SQLDriverConnect-td5755239.html

and

https://www.url-encode-decode.com

PWD=p%C3%BC

should accepted as pü

How to use special characters in passwords ?

Client application is Microsoft Visual Foxpro 9

Using Postgres 13.1 with 32-bit psqlodbc driver 13.00.0000 in Windows 10 non-unicode application where system locale is Windows-1257 (Baltic Windows)

Andrus
  • 26,339
  • 60
  • 204
  • 378
  • That looks right. Look at the PostgreSQL log. If that says that the password was wrong, use Wireshark to determine what password actually gets sent to the PostgreSQL server. – Laurenz Albe Feb 26 '21 at 03:22
  • I tried `log_statement=all` After logging in server accepts some commands but starting at odbc driver generated command `select n.nspname, c.relname, a.attname, a.atttypid, t.typname... ` fails. Log file contains `password authentication failed for user "test"` It looks like ü password is lost after some commands. Maybe connection pool stores password in wrong format. How to diagnose this ? – Andrus Feb 27 '21 at 21:30
  • @LaurenzAlbe Wireshark shows traffic, some with `PGSQL` protocol. How to find which password is sent after initial connection ? Cliend and server are in same Windows 10 computer – Andrus Feb 27 '21 at 21:38
  • The traffic will contain the hashed password. See [the documentation](https://www.postgresql.org/docs/current/protocol-message-formats.html) for the message format. You could temporarily switch to `password` authentication to get the clear text password in the message. Then you can check what is really sent, which will help you debug. – Laurenz Albe Mar 01 '21 at 06:56

0 Answers0