Skip to Content.
Sympa Menu

freetds - Re: [freetds] Force use of UTF-8 instead of ISO8859-1

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Michael Mata <michaelvmata AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Force use of UTF-8 instead of ISO8859-1
  • Date: Tue, 2 Feb 2010 15:56:32 -0800

On Thu, Jan 28, 2010 at 11:44 AM, Frediano Ziglio <freddy77 AT gmail.com>wrote:

> 2010/1/28 Michael Mata <michaelvmata AT gmail.com>:
> > this should be a DSN-less configuration that does not use freetds.conf.
> Is
> > there a way to set the client charset using this configuration?
>
> Not with 0.82... support for additional attributes was added in CVS HEAD.
>
> freddy77
>

Since we can't specify client charset in a DSN-less configuration, I
reverted to using freetds.conf and I'm still getting str returned instead of
unicode. My config files are now:

odbcinst.ini

[ODBC]
Trace = Yes
TraceFile = /tmp/unixodbc.log

[FreeTDS]
Driver = /usr/local/lib/libtdsodbc.so
Setup = /usr/local/lib/libtdsS.so

freetds.conf

[global]
text size = 64512
client charset = UTF-8

[FreeTDS]
host = ******
port = 1433
tds version = 8.0
client charset = UTF-8

tsql -C
Compile-time settings (established with the "configure" script)
Version: freetds v0.82.1.dev.20091223
freetds.conf directory: /usr/local/etc
MS db-lib source compatibility: no
Sybase binary compatibility: no
Thread safety: yes
iconv library: yes
TDS version: 8.0
iODBC: no
unixodbc: yes

I can verify that freetds.conf is being used since the server host and port
information is being used, so I assume the client charset is now forced to
UTF-8. Maybe my original assumption is wrong. Is it possible this is not
an issue of forcing UTF-8, but an issue of how nvarchar, ntext, etc columns
are mapped to the Python equivalents?




Archive powered by MHonArc 2.6.24.

Top of Page