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 15:33:34 -0400

On Tue, Apr 20, 2010 at 01:06:38PM -0700, Vinh Nguyen wrote:
> On Tue, Apr 20, 2010 at 11:00 AM, <jklowden AT schemamania.org> wrote:
> >> So what exactly is the issue again? ?Is there a difference betweenOn
> >> Tue, Apr 20, 2010 at 01:06:38PM -0700, Vinh Nguyen wrote:
> Issuing your command with tds version 8.0 specified I get:
> config.c:202: server_charset = iso_1
> config.c:216: client_charset = ISO-8859-1
>
> When I specify "client charset = UTF-8" in my .freetds.conf file, I get:
>
> config.c:479: client charset = 'UTF-8'
> config.c:526:tds_config_login: client charset is UTF-8.
> config.c:202: server_charset = iso_1
> config.c:216: client_charset = UTF-8
>
> However, with this, when I use tsql I get:
>
> locale is "en_US.utf-8"
> locale charset is "utf-8"
> Default database being set to IBADataDictionary
> Msg 20017, Level 9, State -1, Server OpenClient, Line -1
> Unexpected EOF from the server

Yes, that's what I meant. :-/

I think there might be a bug. I have a Mac but I won't be able
to look at it for the next few days and I don't want you to
wonder what happened.

Please post the TDSDUMP log again now that you have that line in your
freetds.conf. Also the output of locale(1).

tsql is just reporting the results of nl_langinfo(3). AFAICT
that output isn't right: it's reporting an encoding that can't be
used by iconv(3). That leads me to think your environment is
misconfigured.

The "client charset = UTF-8" line in your freetds.conf is supposed to
override environmental settings such as the LANG variable. With it, your
TDSDUMP should not report

iconv.c:432:tds_iconv_info_init: client charset name "" unrecognized

If TDSDUMP still reports that even with UTF-8 set in your freet.conf, that
would
be a bug. I vaguely remember discussing this before, but yours would be the
clearest indication. (It might even be fixed in CVS HEAD. Yes,
we need a release.)

A workaround might be to clear any environment locale-related environment
variables before starting tsql. Or replace them with upper-case
versions.

HTH.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page