Re: Mac OSX FreeTDS 0.8.3dev Unexpected EOF from the server

"Craig A. Berry" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
On May 6, 2010, at 11:48 PM, Luciano Pacheco wrote:

> Hi,
>
> I'm trying connect from Mac OSX Leopard with FreeTDS to a MSSQL 2000  
> MSDE,
> and I'm getting this error:
>
> [01:40:09] $ /usr/local/bin/tsql  -S MACLUCK -I
> /opt/local/etc/freetds/freetds.conf  -U lucianopacheco -D  
> dbServicos  -P
> <password snipped>
> locale is "pt_BR.utf-8"
> locale charset is "utf-8"

I think that's your problem right there.  How is this locale set?  Do  
you have LANG in your environment?  What do you get from:

% locale -a | grep  pt_BR
pt_BR
pt_BR.ISO8859-1
pt_BR.UTF-8


(that's what I see on my Leopard system).  If yours is anything like  
mine, pt_BR.UTF-8 is a valid locale setting, but pt_BR.utf-8 is not.

> 01:45:08.194206 76313 (iconv.c:364):setting up conversions for client
> charset "utf-8"
> 01:45:08.194215 76313 (iconv.c:366):preparing iconv for "utf-8" <->
> "UCS-2LE" conversion
> 01:45:08.194237 76313 (iconv.c:442):tds_iconv_info_init: client  
> charset name
> "" unrecognized
>

FreeTDS knows what to do with UTF-8 (upper case) but not (utf-8) lower  
case.

> What else can I try ?

Try fisql or see my tsql.c patch in the archives from a week or so  
ago.  There's still a bug or two that need to be fixed regarding  
overriding the system default character set, but getting yourself into  
a position where you don't need an override is probably your best bet.

________________________________________
Craig A. Berry
mailto:[email protected]

"... getting out of a sonnet is much more
  difficult than getting in."
                  Brad Leithauser
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.