[freetds] One failing unit test (iconv_read) on git master on OS X

Marc Abramowitz marca at surveymonkey.com
Sun Sep 15 14:24:53 EDT 2013

On 9/15/13 9:27 AM, "Marc Abramowitz" <marca at surveymonkey.com> wrote:

>It's curious that tds_iconv seems to fail (with errno 7 - what's that?)
>when it's only 1024 bytes into the string; still in the middle of all the
>'a' characters; it hasn't gotten to the special character yet it seems.

It looks like, according to errno and the iconv(3) man page [1] that errno
7 is E2BIG:

[E2BIG] Input conversion stopped due to lack of space in the output buffer.

So perhaps there's only 1024 bytes of space in the output buffer? I'll try
to dig in...

I also noticed that tds_bcp_fread is returning 0:

res 0 out_len 1024
out 1024 bytes expected 4077

which implies that it succeeded. It seems that it should return an error
code in this case? Maybe return E2BIG?


[1]: http://pubs.opengroup.org/onlinepubs/009695399/functions/iconv.html

More information about the FreeTDS mailing list