From: Hiroshi Saito <z-saito@guitar.ocn.ne.jp>
To: Sofer, Yuval <Yuval_Sofer@bmc.com>
To: pgsql-odbc@postgresql.org
Subject: Re: odbc problem on Japanese windows machine
Date: Fri, 14 Dec 2007 15:35:52 +0900
Message-ID: <014f01c83e1b$92cc49c0$c601a8c0@HP22720319231> (raw)
References: <E9DE7963E5EA6546B42A979EC28B4D0136B5ADEE@hou-ex-02.adprod.bmc.com>
Hi.
Sorry late reaction...
It is the conversion which is not supported by PostgreSQL. It does not have
the conversion definition between LATIN1 and SJIS.
See,
http://www.postgresql.org/docs/8.2/static/multibyte.html#AEN24142
Regards,
Hiroshi Saito
----- Original Message -----
From: Sofer, Yuval
To: pgsql-odbc@postgresql.org
Sent: Thursday, December 13, 2007 10:51 PM
Subject: [ODBC] odbc problem on Japanese windows machine
Hi,
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.
Connection tests to databases with latin1 encoding fail with this error message:
fatal: conversion between SJIS and LATIN1 is not supported
Connection tests to databases with utf8 encoding succeed.
I checked both server source and odbc driver source and saw that the message comes from
postgres server code.
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:
alter database <db_name> set client_encoding="SJIS"
Is there any switch in the code to bypass local machine encoding?
Why does it send Japanese encoding?
Postgres odbc driver is not Japanese application. For what the conversion is needed?
Is there any way to overcome this problem?
Steps to reproduce error message:
1. Put postgres odbc drivers (psqlodbc30a.dll and psqlodbc35w.dll) under c:\windows\system32
2. Update machine registry with next values:
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers]
"PostgreSQL ANSI"="Installed"
"PostgreSQL Unicode"="Installed"
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL ANSI]
"APILevel"="1"
"ConnectFunctions"="YYN"
"Driver"="c:\windows\system32\PSQLODBC30A.DLL"
"DriverODBCVer"="03.00"
"FileUsage"="0"
"Setup"=" c:\windows\system32\PSQLODBC30A.DLL"
"SQLLevel"="1"
"UsageCount"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL Unicode]
"APILevel"="1"
"ConnectFunctions"="YYN"
"Driver"=" c:\windows\system32\PSQLODBC35W.DLL"
"DriverODBCVer"="03.51"
"FileUsage"="0"
"Setup"=" c:\windows\system32\PSQLODBC35W.DLL"
"SQLLevel"="1"
"UsageCount"=dword:00000001
3. Create datasource and test connection to latin1 encoding database:
Settings -> administrative tools -> data source (ODBC)
And then add system data source with postgres driver. Configure this data source to
connect to latin1 postgres database.
Thanks,
Yuval Sofer
BMC Software
CTM&D Business Unit
DBA Team
972-52-4286-282
yuval_sofer@bmc.com
Yuval Sofer
BMC Software
CTM&D Business Unit
DBA Team
972-52-4286-282
yuval_sofer@bmc.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: z-saito@guitar.ocn.ne.jp, Yuval_Sofer@bmc.com
Subject: Re: odbc problem on Japanese windows machine
In-Reply-To: <014f01c83e1b$92cc49c0$c601a8c0@HP22720319231>
References: <E9DE7963E5EA6546B42A979EC28B4D0136B5ADEE@hou-ex-02.adprod.bmc.com> <014f01c83e1b$92cc49c0$c601a8c0@HP22720319231>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox