Re: One failing unit test (iconv_read) on git master on OS X

Marc Abramowitz <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <CE5B4857.1FB4B%[email protected]>
On 9/15/13 9:27 AM, "Marc Abramowitz" <[email protected]> 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?

Marc

[1]: http://pubs.opengroup.org/onlinepubs/009695399/functions/iconv.html
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.