odbc problem on Japanese windows machine
am 13.12.2007 14:51:41 von Yuval_SoferThis is a multi-part message in MIME format.
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:11.0pt;font-family:Arial;color:navy'>Step s to =
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:
style=3D'font-size:10.0pt;
style=3D'font-size:10.0pt;
style=3D'font-size:10.0pt;
style=3D'font-size:10.0pt;
style=3D'font-size:
------_=_NextPart_001_01C83D8F.4AF118C7
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hi,=20
=20
I am trying to use postgres odbc driver on windows Japanese machine, to
test connection to a remote postgres database. The database has latin1
encoding.=20
=20
Connection tests to databases with latin1 encoding fail with this error
message:=20
=20
fatal: conversion between SJIS and LATIN1 is not supported
=20
Connection tests to databases with utf8 encoding succeed.
=20
I checked both server source and odbc driver source and saw that the
message comes from postgres server code.=20
=20
It seems that the postgres odbc sends SJIS characters to the latin1
database and it cannot convert.
I know that the next command retrieves with the same error:=20
=20
alter database
=20
Is there any switch in the code to bypass local machine encoding?
Why does it send Japanese encoding?=20
Postgres odbc driver is not Japanese application. For what the
conversion is needed?=20
Is there any way to overcome this problem?=20
=20
Steps to reproduce error message:=20
=20
1. Put postgres odbc drivers (psqlodbc30a.dll and psqlodbc35w.dll) under
c:\windows\system32
=20
2. Update machine registry with next values:=20
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers]
"PostgreSQL ANSI"=3D"Installed"
"PostgreSQL Unicode"=3D"Installed"
=20
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL ANSI]
"APILevel"=3D"1"
"ConnectFunctions"=3D"YYN"
"Driver"=3D"c:\windows\system32\PSQLODBC30A.DLL"
"DriverODBCVer"=3D"03.00"
"FileUsage"=3D"0"
"Setup"=3D" c:\windows\system32\PSQLODBC30A.DLL"
"SQLLevel"=3D"1"
"UsageCount"=3Ddword:00000001
=20
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL Unicode]
"APILevel"=3D"1"
"ConnectFunctions"=3D"YYN"
"Driver"=3D" c:\windows\system32\PSQLODBC35W.DLL"
"DriverODBCVer"=3D"03.51"
"FileUsage"=3D"0"
"Setup"=3D" c:\windows\system32\PSQLODBC35W.DLL"
"SQLLevel"=3D"1"
"UsageCount"=3Ddword:00000001
=20
3. Create datasource and test connection to latin1 encoding database:=20
Settings -> administrative tools -> data source (ODBC)=20
And then add system data source with postgres driver. Configure this
data source to=20
connect to latin1 postgres database.
=20
Thanks,=20
=20
Yuval Sofer
BMC Software
CTM&D Business Unit
DBA Team
972-52-4286-282
yuval_sofer@bmc.com
=20
=20
=20
Yuval Sofer
BMC Software
CTM&D Business Unit
DBA Team
972-52-4286-282
yuval_sofer@bmc.com
=20
------_=_NextPart_001_01C83D8F.4AF118C7
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
xmlns=3D"http://www.w3.org/TR/REC-html40">
charset=3Dus-ascii">
11.0pt;font-family:Arial;color:navy'>Hi,
11.0pt;font-family:Arial;color:navy'>
11.0pt;font-family:Arial;color:navy'>I am trying to use postgres odbc =
driver on
windows Japanese machine, to test connection to a remote postgres =
database. The
database has latin1 encoding.
11.0pt;font-family:Arial;color:navy'>
11.0pt;font-family:Arial;color:navy'>Connection tests to databases with =
latin1
encoding fail with this error message:
11.0pt;font-family:Arial;color:navy'>
11.0pt;font-family:Arial;color:navy'>fatal: conversion between SJIS and =
LATIN1
is not supported
11.0pt;font-family:Arial;color:navy'>
11.0pt;font-family:Arial;color:navy'>Connection tests to databases with =
utf8
encoding succeed.
11.0pt;font-family:Arial;color:navy'>
11.0pt;font-family:Arial;color:navy'>I checked both server source and =
odbc
driver source and saw that the message comes from postgres server code. =
11.0pt;font-family:Arial;color:navy'>
11.0pt;font-family:Arial;color:navy'>It seems that the postgres odbc =
sends SJIS
characters to the latin1 database and it cannot =
convert.
11.0pt;font-family:Arial;color:navy'>I know that the next command =
retrieves
with the same error:
11.0pt;font-family:Arial;color:navy'>
11.0pt;font-family:Arial;color:navy'>alter database <db_name> set
client_encoding=3D"SJIS"
11.0pt;font-family:Arial;color:navy'>
11.0pt;font-family:Arial;color:navy'>Is there any switch in the code to =
bypass
local machine encoding?
11.0pt;font-family:Arial;color:navy'>Why does it send Japanese encoding? =
11.0pt;font-family:Arial;color:navy'>Postgres odbc driver is not =
Japanese
application. For what the conversion is needed? =
11.0pt;font-family:Arial;color:navy'>Is there any way to overcome this =
problem?
11.0pt;font-family:Arial;color:navy'>
reproduce error
message:
11.0pt;font-family:Arial;color:navy'>
11.0pt;font-family:Arial;color:navy'>1. Put postgres odbc drivers
(psqlodbc30a.dll and psqlodbc35w.dll) under =
c:\windows\system32
11.0pt;font-family:Arial;color:navy'>
11.0pt;font-family:Arial;color:navy'>2. Update machine registry with =
next
values:
11.0pt;font-family:Arial;color:navy'>[HKEY_LOCAL_MACHINE\SOF TWARE\ODBC\OD=
BCINST.INI\ODBC
Drivers]
11.0pt;font-family:Arial;color:navy'>"PostgreSQL
ANSI"=3D"Installed"
11.0pt;font-family:Arial;color:navy'>"PostgreSQL
Unicode"=3D"Installed"
11.0pt;font-family:Arial;color:navy'>
11.0pt;font-family:Arial;color:navy'>[HKEY_LOCAL_MACHINE\SOF TWARE\ODBC\OD=
BCINST.INI\PostgreSQL
ANSI]
11.0pt;font-family:Arial;color:navy'>"APILevel"=3D"1"=
11.0pt;font-family:Arial;color:navy'>"ConnectFunctions"=3D"=
;YYN"
11.0pt;font-family:Arial;color:navy'>"Driver"=3D"c:\window=
s\system32\PSQLODBC30A.DLL"
11.0pt;font-family:Arial;color:navy'>"DriverODBCVer"=3D"03=
..00"
11.0pt;font-family:Arial;color:navy'>"FileUsage"=3D"0"=
;
11.0pt;font-family:Arial;color:navy'>"Setup"=3D"
c:\windows\system32\PSQLODBC30A.DLL"
11.0pt;font-family:Arial;color:navy'>"SQLLevel"=3D"1"=
11.0pt;font-family:Arial;color:navy'>"UsageCount"=3Ddword:00000=
001
11.0pt;font-family:Arial;color:navy'>
11.0pt;font-family:Arial;color:navy'>[HKEY_LOCAL_MACHINE\SOF TWARE\ODBC\OD=
BCINST.INI\PostgreSQL
Unicode]
11.0pt;font-family:Arial;color:navy'>"APILevel"=3D"1"=
11.0pt;font-family:Arial;color:navy'>"ConnectFunctions"=3D"=
;YYN"
11.0pt;font-family:Arial;color:navy'>"Driver"=3D"
c:\windows\system32\PSQLODBC35W.DLL"
11.0pt;font-family:Arial;color:navy'>"DriverODBCVer"=3D"03=
..51"
11.0pt;font-family:Arial;color:navy'>"FileUsage"=3D"0"=
;
11.0pt;font-family:Arial;color:navy'>"Setup"=3D"
c:\windows\system32\PSQLODBC35W.DLL"
11.0pt;font-family:Arial;color:navy'>"SQLLevel"=3D"1"=
11.0pt;font-family:Arial;color:navy'>"UsageCount"=3Ddword:00000=
001
11.0pt;font-family:Arial;color:navy'>
11.0pt;font-family:Arial;color:navy'>3. Create datasource and test =
connection
to latin1 encoding database:
11.0pt;font-family:Arial;color:navy'>Settings -> administrative tools =
->
data source (ODBC)
11.0pt;font-family:Arial;color:navy'>And then add system data source =
with
postgres driver. Configure this data source to =
11.0pt;font-family:Arial;color:navy'>connect to latin1 postgres =
database.
11.0pt;font-family:Arial;color:navy'>
11.0pt;font-family:Arial;color:navy'>Thanks, =
11.0pt;font-family:Arial;color:navy'>
11.0pt;font-family:Arial;color:navy'>Yuval Sofer
BMC Software
CTM&D Business Unit
11.0pt;font-family:Arial;color:navy'>DBA Team
972-52-4286-282
title=3D"mailto:yuval_sofer@bmc.com">
color=3Dnavy title=3D"mailto:yuval_sofer@bmc.com">
title=3D"mailto:yuval_sofer@bmc.com">
style=3D'color:navy'>yuval_sofer@bmc.com
11.0pt;font-family:Arial;color:navy'>
font-family:Arial'>
font-family:Arial'>
font-family:Arial'>Yuval Sofer
BMC Software
CTM&D Business Unit
font-family:Arial'>DBA Team
972-52-4286-282
href=3D"mailto:yuval_sofer@bmc.com">yuval_sofer@bmc.com=
size=3D2 face=3DArial>
style=3D'font-size:10.0pt;font-family:Arial'>
12.0pt'>
------_=_NextPart_001_01C83D8F.4AF118C7--