user names & non-ASCII
user names & non-ASCII
От:
"Pavel Holec" <holec@email.cz>
Дата:
Hi All, please help.
I Have PostgreSQL server 8.4.9 on Linux, database utf-8 and Client app on Windows (VC++ and libpq.dll).
I need to use user account with non-ASCII and that's my problem. SET CLIENT_ENCODING TO 'WIN1250' after PQconnectdb is too late because connection fails. I need set encoding with PQconnectdb() but options="client_encoding=WIN1250" doesn't work.
Best regards,
Pavel Holec
Re: user names & non-ASCII
От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
On tor, 2011-12-15 at 01:22 +0100, Pavel Holec wrote: > I Have PostgreSQL server 8.4.9 on Linux, database utf-8 and Client app on Windows (VC++ and libpq.dll). > I need to use user account with non-ASCII and that's my problem. SET CLIENT_ENCODING TO 'WIN1250' after PQconnectdb is too late because connection fails. I need set encoding with PQconnectdb() but options="client_encoding=WIN1250" doesn't work. In the connection request, you effectively need to specify the user name (and database name) as bytes in the encoding that you created them in. I don't think this is documented in an obvious way.