Problem reading utf8 on windows XP

--_2a59dff7-3a34-4393-ad3a-937874a67544_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


Excuse me=2C 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=2C when I try to read data on a machine running windows xp=2C 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 enco=
ding. Now=2C if I choose to set it to UNICODE
I will get a compilation error=2C since then SQLConnect will be defiend as =
SQLConnectW=2C which in turn expects that I use WCHAR instead of CHAR and s=
imilar errors. I think I would like to just get utf8 data back in CHARs=2C =
not WCHARs.

Below is an excerpt of how I try to read data back. This seems to work on L=
inux where
everything seemingly work out as I expect.
rc =3D SQLGetData(_statementHandle=2C column=2C SQL_C_CHAR=2C valueBuf.get=
()=2C bufSize=2C &length)=3B


Moreover=2C I have not foun any documentation that brings clarity to the su=
bject=2C so if you have any
hints to where I could find documentation with examples I would be glad.

Best regards=2C
Paul.

____________________________________________________________ _____
Vem är du? Gör personlighetstestet p=E5 MSN Dejting!
http://dejting.se.msn.com/channel/index.aspx?trackingid=3D10 02952=

--_2a59dff7-3a34-4393-ad3a-937874a67544_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style>
..hmmessage P
{
margin:0px=3B
padding:0px
}
body.hmmessage
{
font-size: 10pt=3B
font-family:Verdana
}
</style>
</head>
<body class=3D'hmmessage'>
Excuse me=2C if I haven't fully understood the subject here...<br><br>I hav=
e a postgres db 8.1.11 on Linux. The data is utf8-encoded in the db. <br>I =
have no problems reading or writing utf8 on Linux.<br><br>Now=2C when I try=
to read data on a machine running windows xp=2C with odbc version 8.02.04.=
00.<br>I cannot manage to read utf8. How do I do that?<br><br>I am a bit lo=
st concerning how to configure odbc.<br>Which driver am I supposed to use t=
o just get the "plain" utf8 right out of the database _without any conversi=
ons_?<br>Now it seems like I am getting some kind of mbcs or ISO-8859-1 enc=
oded data or something like that.<br><br>I tried to use the Unicode driver.=
Is that the right one?<br><br>I am using visual studio 2005. There I have =
an option to set character encoding. Now=2C if I choose to set it to UNICOD=
E<br>I will get a compilation error=2C since then SQLConnect will be defien=
d as SQLConnectW=2C 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 CHAR=
s=2C not WCHARs.<br><br>Below is an excerpt of how I try to read data back.=
This seems to work on Linux where <br>everything seemingly work out as I e=
xpect.<br> =3Brc =3D SQLGetData(_statementHandle=2C column=2C SQL_C_CHA=
R=2C valueBuf.get()=2C bufSize=2C &=3Blength)=3B<br><br><br>Moreover=2C =
I have not foun any documentation that brings clarity to the subject=2C so =
if you have any <br>hints to where I could find documentation with examples=
I would be glad.<br><br>Best regards=2C<br>Paul.<br>
<hr />Gör pers=
onlighetstestet p=E5 MSN Dejting=2C se vem du passar ihop med! <a href=3D'h=
ttp://dejting.se.msn.com/channel/index.aspx?trackingid=3D100 2952' target=3D=
'_new'>MSN Dejting</a></body>
</html>=

--_2a59dff7-3a34-4393-ad3a-937874a67544_--
p n [ Di, 16 Juni 2009 10:57 ] [ ID #2005214 ]
Datenbanken » gmane.comp.db.postgresql.odbc » Problem reading utf8 on windows XP

Vorheriges Thema: asp classic and postgreSQL
Nächstes Thema: ODBL windows has no drop down choices