Re: Force use of UTF-8 instead of ISO8859-1

[email protected]
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
On Tue, Feb 02, 2010 at 03:56:32PM -0800, Michael Mata wrote:
> 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.
> 
> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.