Skip site navigation (1) Skip section navigation (2)

odbc problem on Japanese windows machine

From: "Sofer, Yuval" <Yuval_Sofer(at)bmc(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: odbc problem on Japanese windows machine
Date: 2007-12-13 13:40:22
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin


I am trying to use postgres odbc driver on windows Japanese machine, to
test connection to a remote postgres database. The database has latin1


Connection tests to databases with latin1 encoding fail with this error


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


2. Update machine registry with next values: 


"PostgreSQL ANSI"="Installed"

"PostgreSQL Unicode"="Installed"








"Setup"=" c:\windows\system32\PSQLODBC30A.DLL"







"Driver"=" c:\windows\system32\PSQLODBC35W.DLL"



"Setup"=" c:\windows\system32\PSQLODBC35W.DLL"




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.




Yuval Sofer
BMC Software
CTM&D Business Unit

DBA Team
yuval_sofer(at)bmc(dot)com <mailto:yuval_sofer(at)bmc(dot)com> 



pgsql-admin by date

Next:From: Kevin KempterDate: 2007-12-13 17:06:23
Subject: pg_restore error
Previous:From: olivier boissardDate: 2007-12-13 13:15:13
Subject: Re: improve performance in a big table

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group