Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 9DBFFF497B6 for ; Mon, 27 Feb 2012 08:03:14 -0400 (AST) Received: from mailout-de.gmx.net ([213.165.64.23]) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1S1zIK-0003Lg-AQ for pgsql-docs@postgresql.org; Mon, 27 Feb 2012 12:03:13 +0000 Received: (qmail invoked by alias); 27 Feb 2012 12:02:55 -0000 Received: from a88-115-218-87.elisa-laajakaista.fi (EHLO [10.0.0.108]) [88.115.218.87] by mail.gmx.net (mp033) with SMTP; 27 Feb 2012 13:02:55 +0100 X-Authenticated: #495269 X-Provags-ID: V01U2FsdGVkX1/97iN22oT9wsipNBL71l9VfNnzvRd/ltaQ2kEz1x Ii3fajmVI06p+n Message-ID: <1330344173.7111.23.camel@vanquo.pezone.net> Subject: Re: user names & non-ASCII From: Peter Eisentraut To: Pavel Holec Cc: pgsql-docs@postgresql.org Date: Mon, 27 Feb 2012 14:02:53 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.2-1 Content-Transfer-Encoding: 7bit Mime-Version: 1.0 X-Y-GMX-Trusted: 0 X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201202/11 X-Sequence-Number: 7195 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.