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

jklowden at schemamania.org jklowden at schemamania.org
Fri Feb 5 15:51:36 EST 2010

On Tue, Feb 02, 2010 at 03:56:32PM -0800, Michael Mata wrote:
> 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.
> 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.  

The best advice is to upgrade to the latest snapshot and use ClientCharset in odbc.ini (or your DSN-less connection string).  I tested that and it works.  

The servername-to-freetd.conf client charset lookup should work, though, in 0.82, provided the charset name is recognized by your iconv library.  You can verify the name with iconv(1).  

> 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?

The client charset used will appear in the TDSDUMP log.  



More information about the FreeTDS mailing list