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: Vinh Nguyen <vinhdizzo AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] SQL Server version and TDS Version
  • Date: Tue, 20 Apr 2010 13:06:38 -0700

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

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

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 rows affected

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
Msg 20002, Level 9, State -1, Server OpenClient, Line -1
Adaptive Server connection failed
There was a problem connecting to the server

Is this what you meant by changing it to UTF-8?

Thanks!
Vinh




Archive powered by MHonArc 2.6.24.

Top of Page