Re: SQL Server version and TDS Version

Vinh Nguyen <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
On Tue, Apr 20, 2010 at 11:00 AM,  <[email protected]> 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
_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
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.