Skip to Content.
Sympa Menu

freetds - Re: [freetds] SQL Server version and TDS Version

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] SQL Server version and TDS Version
  • Date: Tue, 20 Apr 2010 14:00:51 -0400

On Tue, Apr 20, 2010 at 10:27:15AM -0700, Vinh Nguyen wrote:
> On Mon, Apr 19, 2010 at 7:55 AM, Vinh Nguyen <vinhdizzo AT gmail.com> 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




Archive powered by MHonArc 2.6.24.

Top of Page