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: jklowden AT schemamania.org
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Force use of UTF-8 instead of ISO8859-1
  • Date: Fri, 5 Feb 2010 15:51:36 -0500

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.

HTH.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page