Re: SQLGetData() returns len 4095 for empty TEXT on AIX 6.1 without ClientCharset defined

Sebastien FLAESCH <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Organization Four Js Development Tools
Message-ID <[email protected]>
Great!

I will test the last version...

Keep in mind my remark about invalid iconv names. During my tests, I saw
that an invalid ClientCharset value was just ignored. By mistake I used
a system locale (LANG/LC_ALL) name instead of an iconv charset name...

If iconv cannot initialize properly, freetds lib should stop with an error.

Seb

On 04/04/2013 10:21 PM, Frediano Ziglio wrote:
> Fix in git repository. Also fixed problem with AIX and SQLPutData with 0
> bytes.
>
> Frediano
>
>
> 2013/4/4 Frediano Ziglio<[email protected]>
>
>> Found!
>>
>> Actually the problem is in iconv AIX implementation, iconv is a function
>> like
>>
>> size_t iconv(iconv_t cd,
>>                      char **inbuf, size_t *inbytesleft,
>>                      char **outbuf, size_t *outbytesleft);
>>
>> if *inbuf is NULL and *inbytesleft is 0 AIX threat input as an infinite
>> buffer with zeroes so it convert an empty string (cause for libTDS view is
>> an empty string) to a set of zeroes (actually up to the output buffer which
>> is 4095 if you take into account space for terminator).
>>
>> The simpler fix is to test and assume empty string if *inbytesleft == 0 in
>> tds_iconv.
>>
>> Frediano
>>
>>
>>
>> 2013/4/2 Sebastien FLAESCH<[email protected]>
>>
>>> Ok thanks.
>>> We'll setup one of our AIX machines to give you access.
>>> Seb
>>>
>>> On 03/30/2013 04:24 PM, Frediano Ziglio wrote:
>>>> Can I have access to one of the AIX machines ??
>>>>
>>>> I'm currently on holidays, I'll be back on Thursday.
>>>>
>>>> Frediano
>>>
>>>
>>> _______________________________________________
>>> FreeTDS mailing list
>>> [email protected]
>>> http://lists.ibiblio.org/mailman/listinfo/freetds
>>>
>>
>>
> _______________________________________________
> 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.