Varchar parameter conversion
am 23.07.2007 15:43:25 von Sergey.ZubkovskyThis is a multi-part message in MIME format.
------_=_NextPart_001_01C7CD2F.713E5EEF
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hello,
=20
My client program is developed on C++ & ODBC.
It's a Windows Unicode application.
=20
I'm trying to pass a "varchar" parameter value to a user-defined stored
procedure.
Each character of this actual parameter value (which ASC code is greater
than 127) is transformed into some two chars.
This value is stored and bound as a non-Unicode string (traditional
C-string) in the program.
So, some conversion happens for these characters.
It seems to me that it's the ODBC driver's intervention.
=20
Is that right?
And how can I avoid this unwanted conversion?
=20
Additional environment info:
=20
OS: Windows XP SP2
PostgreSQL version: "PostgreSQL 8.2.4 on i686-pc-mingw32, compiled by
GCC gcc.exe (GCC) 3.4.2 (mingw-special)"
ODBC driver version: PostgreSQL Unicode 8.02.04.00
=20
SHOW server_encoding;
"SQL_ASCII"
=20
SHOW client_encoding;
"SQL_ASCII"
=20
Thank you.
=20
------_=_NextPart_001_01C7CD2F.713E5EEF
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
xmlns=3D"http://www.w3.org/TR/REC-html40">
charset=3Dus-ascii">
style=3D'font-size:
10.0pt;font-family:Verdana'>Hello,
style=3D'font-size:
10.0pt;font-family:Verdana'>
style=3D'font-size:
10.0pt;font-family:Verdana'>My client program is developed on C++ & =
ODBC.
style=3D'font-size:
10.0pt;font-family:Verdana'>It’s a Windows Unicode =
application.
style=3D'font-size:
10.0pt;font-family:Verdana'>
style=3D'font-size:
10.0pt;font-family:Verdana'>I’m trying to pass a =
“varchar”
parameter value to a user-defined stored =
procedure.
color=3Dblack
face=3DVerdana>
style=3D'font-size:9.0pt;font-family:Verdana;
color:black'>Each character of this actual parameter value (which ASC =
code is
greater than 127) is transformed into some two =
chars.
color=3Dblack
face=3DVerdana>
style=3D'font-size:9.0pt;font-family:Verdana;
color:black'>This value is stored and bound as a non-Unicode string
(traditional C-string) in the program.
color=3Dblack
face=3DVerdana>
style=3D'font-size:9.0pt;font-family:Verdana;
color:black'>So, some conversion happens for these =
characters.
color=3Dblack
face=3DVerdana>
style=3D'font-size:9.0pt;font-family:Verdana;
color:black'>It seems to me that it’s the ODBC driver’s
intervention.
color=3Dblack
face=3DVerdana>
style=3D'font-size:9.0pt;font-family:Verdana;
color:black'>
color=3Dblack
face=3DVerdana>
style=3D'font-size:9.0pt;font-family:Verdana;
color:black'>Is that right?
lang=3DEN-US
style=3D'font-size:9.0pt;font-family:Verdana;color:black'>An d how can I =
avoid
this unwanted conversion?
face=3DVerdana>
lang=3DEN-US =
style=3D'font-size:10.0pt;font-family:Verdana'>
/p>
style=3D'font-size:
10.0pt;font-family:Verdana'>
style=3D'font-size:
10.0pt;font-family:Verdana'>Additional environment =
info:
style=3D'font-size:
10.0pt;font-family:Verdana'>
face=3D"Courier New">
lang=3DEN-US style=3D'font-size:10.0pt;font-family:"Courier New"'>OS: =
Windows XP
SP2
face=3D"Courier New">
lang=3DEN-US style=3D'font-size:10.0pt;font-family:"Courier =
New"'>PostgreSQL
version: “PostgreSQL 8.2.4 on i686-pc-mingw32, compiled by GCC =
gcc.exe
(GCC) 3.4.2 (mingw-special)”
face=3D"Courier New">
lang=3DEN-US style=3D'font-size:10.0pt;font-family:"Courier New"'>ODBC =
driver
version: PostgreSQL Unicode 8.02.04.00
face=3D"Courier New">
lang=3DEN-US style=3D'font-size:10.0pt;font-family:"Courier =
New"'>
face=3D"Courier New">
lang=3DEN-US style=3D'font-size:10.0pt;font-family:"Courier New"'>SHOW
server_encoding;
face=3D"Courier New">
lang=3DEN-US style=3D'font-size:10.0pt;font-family:"Courier =
New"'>"SQL_ASCII"
face=3D"Courier New">
lang=3DEN-US style=3D'font-size:10.0pt;font-family:"Courier =
New"'>
face=3D"Courier New">
lang=3DEN-US style=3D'font-size:10.0pt;font-family:"Courier New"'>SHOW
client_encoding;
face=3D"Courier New">
lang=3DEN-US style=3D'font-size:10.0pt;font-family:"Courier =
New"'>"SQL_ASCII"
style=3D'font-size:
10.0pt;font-family:Verdana'>
style=3D'font-size:
10.0pt;font-family:Verdana'>Thank you.
style=3D'font-size:
10.0pt;font-family:Verdana'>
------_=_NextPart_001_01C7CD2F.713E5EEF--