From: | p n <pe_no(at)hotmail(dot)com> |
---|---|
To: | <pgsql-odbc(at)postgresql(dot)org> |
Subject: | Problem reading utf8 on windows XP |
Date: | 2009-06-16 08:57:17 |
Message-ID: | COL120-W5998C65B2F1D002D2256F0843F0@phx.gbl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
Excuse me, if I haven't fully understood the subject here...
I have a postgres db 8.1.11 on Linux. The data is utf8-encoded in the db.
I have no problems reading or writing utf8 on Linux.
Now, when I try to read data on a machine running windows xp, with odbc version 8.02.04.00.
I cannot manage to read utf8. How do I do that?
I am a bit lost concerning how to configure odbc.
Which driver am I supposed to use to just get the "plain" utf8 right out of the database _without any conversions_?
Now it seems like I am getting some kind of mbcs or ISO-8859-1 encoded data or something like that.
I tried to use the Unicode driver. Is that the right one?
I am using visual studio 2005. There I have an option to set character encoding. Now, if I choose to set it to UNICODE
I will get a compilation error, since then SQLConnect will be defiend as SQLConnectW, which in turn expects that I use WCHAR instead of CHAR and similar errors. I think I would like to just get utf8 data back in CHARs, not WCHARs.
Below is an excerpt of how I try to read data back. This seems to work on Linux where
everything seemingly work out as I expect.
rc = SQLGetData(_statementHandle, column, SQL_C_CHAR, valueBuf.get(), bufSize, &length);
Moreover, I have not foun any documentation that brings clarity to the subject, so if you have any
hints to where I could find documentation with examples I would be glad.
Best regards,
Paul.
_________________________________________________________________
Vem är du? Gör personlighetstestet på MSN Dejting!
http://dejting.se.msn.com/channel/index.aspx?trackingid=1002952
From | Date | Subject | |
---|---|---|---|
Next Message | Russell S Hall | 2009-06-29 17:32:50 | asp classic and postgreSQL |
Previous Message | J.J.Rousseau | 2009-06-12 16:42:28 | ODBL windows has no drop down choices |