Thread: odbc silently dropping national characters in CP1250 encoding
I have a LATIN2 database on the server side and a Postgresql ANSI odbc connection on the client side (windows xp sp2, latest odbc driver, version 8.03.04.00) when I try inserting something like this: insert into sample_table (sample_column) values ('öüóőúíéáűÍÜÓÖŐÚÉÁŰ') insert into sample_table (sample_column) values ('čćšđž ČĆŽŠĐ') and then selecting it, I get the following: öüóoúíéáuÍÜÓÖOÚÉÁU ccšdž CCŽŠÐ So, the characters ő,ű,Ő,Ű,č,ć,đ,Č and Ć have been silently replaced with o,u,O,U,c,c,d,C and C the same thing happens when database is created with WIN1250 encoding. when I try doing the same thing from pgadminIII, everything is OK - characters are inserted and read properly so I suppose the problem is somewhere in the ODBC connection. Am I missing some setting or how can I set this up properly? Dragan Matic
Dragan Matic wrote: > I have a LATIN2 database on the server side and a Postgresql ANSI odbc > connection on the client side (windows xp sp2, latest odbc driver, > version 8.03.04.00) > > when I try inserting something like this: > > insert into sample_table (sample_column) values ('öüóőúíéáűÍÜÓÖŐÚÉÁŰ') > insert into sample_table (sample_column) values ('čćšđž ČĆŽŠĐ') > > and then selecting it, I get the following: > > öüóoúíéáuÍÜÓÖOÚÉÁU > ccšdž CCŽŠÐ Could you send me the Mylog output of the operations? regards, Hiroshi Inoue
Here are mylog and psqlodbc logs for both win1250 and latin2 databases On Thu, Jun 4, 2009 at 11:29 PM, Hiroshi Inoue<inoue@tpf.co.jp> wrote: > Dragan Matic wrote: >> >> I have a LATIN2 database on the server side and a Postgresql ANSI odbc >> connection on the client side (windows xp sp2, latest odbc driver, >> version 8.03.04.00) >> >> when I try inserting something like this: >> >> insert into sample_table (sample_column) values ('öüóőúíéáűÍÜÓÖŐÚÉÁŰ') >> insert into sample_table (sample_column) values ('čćšđž ČĆŽŠĐ') >> >> and then selecting it, I get the following: >> >> öüóoúíéáuÍÜÓÖOÚÉÁU >> ccšdž CCŽŠÐ > > Could you send me the Mylog output of the operations? > > regards, > Hiroshi Inoue >