On 11-2-2012 17:49, Mark Rotteveel wrote:
> On 11-2-2012 16:03, Mark Rotteveel wrote:
>> And just after I sent my mail I thought of a potential cause which I am
>> now investigating. It looks like the XSQLVAR sqllen field 4, while the
>> data array was only 1 entry long. Reducing the sqllen to the actual
>> length of the array *or* padding the array seems to fix it.
>>
>> Which course of action would be better? Padding the data array or
>> reducing the sqllen to the actual length?
>
> It looks like the native code of Jaybird should take care of this, but
> actually doesn't when the datatype is CHAR (SQL_TEXT)
>
> The code in question is in xsqlda_wrapper.cpp (in
> client-java/src/native/jaygds/source, specifically the code below.
>
> Do you see anything wrong with this?

I found the problem: the fact that it was assigning the size first (to 
then overwrite it with the string) caused the problem, as for a single W 
character in UTF8 it would fill sqldata with 0x87 0x01 0x20 0x20 instead 
of the expected 0x87 0x20 0x20 0x20.

I however would appreciate it if someone could look at the other 
questions in my previous message.

-- 
Mark Rotteveel

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to