| From: | Kadri Raudsepp <raudsepp(dot)kadri(at)gmail(dot)com> |
|---|---|
| To: | pgsql-odbc(at)postgresql(dot)org |
| Subject: | Problem with client_encoding and PsqlODBC driver. |
| Date: | 2015-03-20 11:38:03 |
| Message-ID: | CA+qYNGODy66NzmNaw7pp7Gpz+Ta1DCTeFt_wbZJViDLdC6UqMg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-odbc |
Hello,
I have some trouble with client_encoding using psqlodbc driver and - being
unable to solve it - was hoping you would be able to help me.
I need to import large amount of data to SQL Server from postgres database.
I'm using psqlodbc driver version 9.03.04.00, Microsoft SQL Server 2012 and
postgres version 9.2. My postgres cluster has the encoding SQL_ASCII and
database encoding is LATIN1.
I tried both Unicode(x64) and ANSI(x64) drivers, writing "SET
CLIENT_ENCODING TO 'LATIN1'" to Connect Settings textbox. For both drivers,
connection is successful and I use openquery to read the data, but my text
data is all garbled.
Looking into the driver log I can see that the client_encoding is indeed
set to LATIN1 as expected, but after that cc_lookup_characterset is called
and with that the encoding is changed to UTF8 with Unicode driver and - I'm
not sure what happens with ANSI driver, but the result does not look like
desired. I have attached a log file that contains the logs for both
driver's connection test.
Is there a setting I've overlooked or an action I could take to have the
driver not to override my desired client_encoding? Am I doing something
wrong altogether? Or is there maybe an older version of the driver that
doesn't behave this way?
Thank you in advance and all the best,
Katie
| Attachment | Content-Type | Size |
|---|---|---|
| mylog_2592.log | application/octet-stream | 22.3 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Adrian Klaver | 2015-03-20 14:07:03 | Re: Odbc through vpn |
| Previous Message | Ralph Stefan | 2015-03-19 15:55:06 | BUG #12878: Update fails with ODBC driver 9.0.3.400 |