pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
user names & non-ASCII
2+ messages / 2 participants
[nested] [flat]

* user names & non-ASCII
@ 2011-12-15 00:22  Pavel Holec <holec@email.cz>
  0 siblings, 1 reply; 2+ messages in thread

From: Pavel Holec @ 2011-12-15 00:22 UTC (permalink / raw)
  To: pgsql-docs

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

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: user names & non-ASCII
@ 2012-02-27 12:02  Peter Eisentraut <peter_e@gmx.net>
  parent: Pavel Holec <holec@email.cz>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Eisentraut @ 2012-02-27 12:02 UTC (permalink / raw)
  To: Pavel Holec <holec@email.cz>; +Cc: pgsql-docs

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.





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2012-02-27 12:02 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-12-15 00:22 user names & non-ASCII Pavel Holec <holec@email.cz>
2012-02-27 12:02 ` Peter Eisentraut <peter_e@gmx.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox