Re: Force use of UTF-8 instead of ISO8859-1
Michael Mata <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Jan 28, 2010 at 11:44 AM, Frediano Ziglio <[email protected]>wrote: > 2010/1/28 Michael Mata <[email protected]>: > > 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?