Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wc9NU-0002Xs-SZ for pgsql-odbc@arkaria.postgresql.org; Mon, 21 Apr 2014 08:15:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Wc9NT-0002OE-VX for pgsql-odbc@arkaria.postgresql.org; Mon, 21 Apr 2014 08:15:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wc9NS-0002O7-Up for pgsql-odbc@postgresql.org; Mon, 21 Apr 2014 08:14:59 +0000 Received: from nm44.bullet.mail.ne1.yahoo.com ([98.138.120.51]) by magus.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Wc9NJ-0002Jq-RM for pgsql-odbc@postgresql.org; Mon, 21 Apr 2014 08:14:58 +0000 Received: from [127.0.0.1] by nm44.bullet.mail.ne1.yahoo.com with NNFMP; 21 Apr 2014 08:14:48 -0000 Received: from [98.138.101.129] by nm44.bullet.mail.ne1.yahoo.com with NNFMP; 21 Apr 2014 08:14:34 -0000 Received: from [98.138.87.3] by tm17.bullet.mail.ne1.yahoo.com with NNFMP; 21 Apr 2014 08:14:34 -0000 Received: from [127.0.0.1] by omp1003.mail.ne1.yahoo.com with NNFMP; 21 Apr 2014 08:14:34 -0000 X-Yahoo-Newman-Property: ymail-4 X-Yahoo-Newman-Id: 299628.30028.bm@omp1003.mail.ne1.yahoo.com Received: (qmail 16718 invoked by uid 60001); 21 Apr 2014 08:14:34 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1398068074; bh=Rigue0Cni6zxIZnBAAevfV3yIcRU/DetKRgEOIrBAQE=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=g95wX6/tm51mWzM10WgmS72KceWwR6XSlTYm4rxAUkNqWsmHY5LjPgETiwgedYDYrH35vk1YP7W99dDdphnYS4tZl2ePFdqT57dEMqON/00LEc2KGNolzSdbpyJRALVuRRGXpPYo/GuN4HbqFnYa9ZyE+KKHFMxMhJiGFXsYFNI= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=kxFFq/J4kQmBs9RrknaJAM/P2luDdeaZ0in98+4HDOp7rgGxxYYH23H+GpAySfCrdReTGrjTvmrESDT15kBDfDbF98s5TdtsSD1uy4KjPNG+3hPqp6RTBSRHuyLtkFlvo8y/Zl+WQQmLm0os6v+cptSHwsIQXqltOYJdSk0gOzU=; X-YMail-OSG: k4.BGjEVM1lUOsAChY2S9XYkyLcdXGxUyD2elb7TwaWgwAM gvPgR.SjPaMpc0XJufDvWRajhg9qdp6lfOOHkBC4Egtf.gu2vB.sk4Uywkj5 WvmhxdMdUiAGAfgLxOw5hG2al986cyvkTCL_jKVzojDiCibmbhLKqfDh8MqM o7GkGFtsL.z13KaMuNxniGR3Q83KqaLFNYehQEiCZCJGBUo2ppvG3mNyB6dz 9ShccE_c_YL5A2cQRwyS4.xtdf6OqnvO1Xk8Tcn.dl7LFnCt7DvLr9F40Zqw sCiB1MGb_MD169JslonZf9q0aPsdaf1PoTOXR6VzTrJjjuNFASragXU34Ure DKO2mUjrPrKHIfu8hHvK6SiJDFa7NomrT.ZHYTKEi0wnr.jyoakO78SG1fAW p2GESaiL8EBzBseFeJkclVgEXsp6G4Q3d8zL3zCPXP2Y5mAebfPBwQsdHgwn 6j1QZjPoP1AG7EBF8_S0LPgao_VZCF15TvhSRPzdMhYaw1zuFWf5fHzmwhKT 3muMm Received: from [168.122.66.1] by web121304.mail.ne1.yahoo.com via HTTP; Mon, 21 Apr 2014 01:14:34 PDT X-Rocket-MIMEInfo: 002.001, V2luZG93cyBTZXJ2ZXIgMjAxMgoKTVMgQWNjZXNzIDIwMTAKcHNxbE9EQkNfeDY0IHY5LjIuMSAoVW5pY29kZSkKClBvc3RncmVTUUx4NjQgOS4xLjEzLCBhbmQgOS4yLngKZGI6IGVuY29kaW5nPVVURjg7IGNvbGxhdGlvbiBhbmQgY2hhcmF0ZXIgdHlwZSA9IEVuZ2xpc2hfVW5pdGVkIFN0YXRlcy4xMjUyCgpJIGhhdmUgYSBkYXRhYmFzZSB3aGljaCBoYXMgc29tZSBjb21wb3NpdGUgcHJpbWFyeSBrZXlzIHRoYXQgY29udGFpbiBjaGFyYWN0ZXIgdmFyeWluZyBmaWVsZHMuwqAgU29tZSBvZiB0aGVzZSBmaWUBMAEBAQE- X-Mailer: YahooMailWebService/0.8.185.657 Message-ID: <1398068074.9170.YahooMailNeo@web121304.mail.ne1.yahoo.com> Date: Mon, 21 Apr 2014 01:14:34 -0700 (PDT) From: Tj Crawley Reply-To: Tj Crawley Subject: Access - utf8 To: "pgsql-odbc@postgresql.org" MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="1671867401-1371576383-1398068074=:9170" X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org --1671867401-1371576383-1398068074=:9170 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Windows Server 2012=0A=0AMS Access 2010=0ApsqlODBC_x64 v9.2.1 (Unicode)=0A= =0APostgreSQLx64 9.1.13, and 9.2.x=0Adb: encoding=3DUTF8; collation and cha= rater type =3D English_United States.1252=0A=0AI have a database which has = some composite primary keys that contain character varying fields.=A0 Some = of these fields have unicode characters from a foreign language.=A0 I have = used this configuration for about 1 year without any problems.=A0 All of th= e table data were visible through an Access front end over the unicode 64 o= dbc connection, it worked great.=A0 Yesterday I reinstalled only the postgr= esql software itself.=A0 Neither the OS, nor the odbc driver, nor Access wa= s changed.=A0 I restored my database and within Pgadmin everything looks fi= ne including my data.=A0 Then I went back to my Access frontends and at fir= st everything still looked fine - without having changed anything the data = appeared.=A0 However, then I saw that in the limited cases where my primary= key does contain a unicode character, those rows now appear with the #dele= ted in all fields.=0A=0AThe database encoding is set to UTF8 and I have tri= ed setting the client_encoding variable to UTF8 in the database, in the log= in and group roles and in the .conf file.=A0 There is no change, I still ge= t #deleted.=A0 In fact, I've attempted to set the client_encoding variable = on the database to sql_ascii, but running show client_encoding from any cli= ent still shows utf8, so I don't even know if that variable is having any e= ffect.=A0 This is all very reproducible; I took a new Windows 7 machine, di= d a fresh install of Access, postgresql 9.1.3, odbc x64 unicode 9.3.2.1, cr= eate a db with utf8 encoding, add table with a primary key of character var= ying and add some foreign characters, back in the Access linked table, same= behavior.=0A=0A=0AMy assumption is that the problem is that Access is assu= ming it needs to read the primary keys in utf16 or something similar.=A0 Wh= en it goes back to requery the db to display the table, then it can no long= er find these keys and I get the #deleted. =A0 When I create an Access quer= y on the same table and set the Recordset Type to Snapshot, all of the data= are displayed without any problems.=0A=0AI did see this same problem over = a year ago when I first started using Access and Postgresql together.=A0 I = must have fixed it about a year ago, at which point the problem went away a= nd I have been happily using this configuration ever since.=A0 Unfortunatel= y, I can neither remember nor find on the internet whatever solution I impl= emented back then.=A0 It's probably something in postgresql itself since th= at is the only part of the system I changed, either in the server configura= tion or in the database configure that wasn't brought over through my backu= p/restore process.=0A=0A=0AThank you to all for any help you can provide!= =0A=0A-TJ --1671867401-1371576383-1398068074=:9170 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Windows Server 2012
MS Access 2010
psqlODBC_x64 v9.2.1 (Unicode)
=
PostgreSQLx64 9.1.13, and 9.2.x
db: encoding=3DUTF8; collati= on and charater type =3D English_United States.1252

I have a database which has some composi= te primary keys that contain character varying fields.  Some of these = fields have unicode characters from a foreign language.  I have used t= his configuration for about 1 year without any problems.  All of the tabl= e data were visible through an Access front end over the unicode 64 odbc co= nnection, it worked great.  Yesterday I reinstalled only the postgresq= l software itself.  Neither the OS, nor the odbc driver, nor Access wa= s changed.  I restored my database and within Pgadmin everything looks= fine including my data.  Then I went back to my Access frontends and = at first everything still looked fine - without having changed anything the= data appeared.  However, then I saw that in the limited cases where m= y primary key does contain a unicode character, those rows now appear with = the #deleted in all fields.

=
The database encoding is s= et to UTF8 and I have tried setting the client_encoding variable to UTF8 in= the database, in the login and group roles and in the .conf file.  Th= ere is no change, I still get #deleted.  In fact, I've attempted to se= t the client_encoding variable on the database to sql_ascii, but running sh= ow client_encoding from any client still shows utf8, so I don't even know i= f that variable is having any effect.  This is all very reproducible; = I took a new Windows 7 machine, did a fresh install of Access, postgresql 9= .1.3, odbc x64 unicode 9.3.2.1, create a db with utf8 encoding, add table w= ith a primary key of character varying and add some foreign characters, bac= k in the Access linked table, same behavior.

My= assumption is that the problem is that Access is assuming it needs to read= the primary keys in utf16 or something similar.  When it goes back to= requery the db to display the table, then it can no longer find these keys= and I get the #deleted.   When I create an Access query on the same t= able and set the Recordset Type to Snapshot, all of the data are displayed = without any problems.

=
I did see this same proble= m over a year ago when I first started using Access and Postgresql together= .  I must have fixed it about a year ago, at which point the problem w= ent away and I have been happily using this configuration ever since. = Unfortunately, I can neither remember nor find on the internet whatever so= lution I implemented back then.  It's probably something in postgresql= itself since that is the only part of the system I changed, either in the = server configuration or in the database configure that wasn't brought over = through my backup/restore process.

Thank you to = all for any help you can provide!
-TJ

--1671867401-1371576383-1398068074=:9170--