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 7, 2010, at 10:13 AM, Luciano Pacheco wrote:

> How can I setup this in OSX ? .bash_profile ?

I've been wondering the same.  You can set the locale and language in  
the International preference pane, but I don't know how to set the  
character set.  What do you get from:

% defaults read -g AppleLocale
en_US

>> 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.
>>
>
> Now works! :-)
>
> 11:20:01.979689 740 (iconv.c:364):setting up conversions for client  
> charset
> "UTF-8"
> 11:20:01.979698 740 (iconv.c:366):preparing iconv for "UTF-8" <->  
> "UCS-2LE"
> conversion
> 11:20:01.979723 740 (iconv.c:407):preparing iconv for "ISO-8859-1" <->
> "UCS-2LE" conversion
> 11:20:01.979745 740 (iconv.c:410):tds_iconv_open: done
>
> Maybe FreeTDS can fail more gracefuly when this happen, because the  
> error
> reported on command line is far from helpful. What do you think  
> about it ?

Yes, if you don't have a dump enabled, you have no way to know that  
you're having a character set problem.  I'm not sure it's fixable,  
though, because that would involve bailing out and not even attempting  
a connection if we don't have a known client character set.

> Here is the patch:
> http://lists.ibiblio.org/pipermail/freetds/attachments/20100430/244dd8a5/attachment.obj
>
> I will try the patch with more time.
>
> I read the patch and don't understand why use ISO-8859-1 as default
> encoding, AFAIK the best choice today is use the UTF-8, that can  
> handle more
> use cases, but I'm very new to freetds.

I believe falling back to ISO-8859-1 emulates ancient behavior from  
the commercial clients, but I'm not sure.

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