Re: SQL Server version and TDS Version

[email protected]
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
On Tue, Apr 20, 2010 at 10:27:15AM -0700, Vinh Nguyen wrote:
> On Mon, Apr 19, 2010 at 7:55 AM, Vinh Nguyen <[email protected]> wrote:
> >
> >> > I think FreeTDS doesn't know the encoding, decides it's "probably" ISO
> >> > 8859-1 (wrongly) and mis-encodes something in your login packet,
> >> > causing
> >> > the server to reject it.
> >
> > I'm on snow leopard intel and I get:
> > ~$ iconv -l | grep -i utf\.8
> > UTF-8
> > UTF-8-MAC UTF8-MAC
> 
> I also found a local version of iconv on my mac system:
> /usr/bin/iconv -l | grep -i utf\.8
> UTF-8 UTF8
> UTF-8-MAC UTF8-MAC
> 
> So what exactly is the issue again?  Is there a difference between
> utf-8 and UTF-8?  

There is a difference.  You need to specify UTF-8 as the client
encoding, not  utf-8.  (I'm not sure that will fix everything,
but it's part of the equation.)

Use TDSDUMPCONFIG to see where you're picking up "utf-8".  Change
it to upper case.  See if that helps. 

$ TDSDUMPCONFIG=stdout bsql -S $S -D $D \
	<<< 'select @@version' \
	| grep 'charset'
config.c:479:   client charset = 'ISO-8859-1'
config.c:526:tds_config_login: client charset is ISO-8859-1.
config.c:202:         server_charset = iso_1
config.c:216:         client_charset = ISO-8859-1

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