This may, or may not be related to this previous discussion about converting a ucharArray to String vs WString, started here.
I am filling tDataSource from a API call, that fills up a uchar array. in UTF-16.
Basically:
Code:
// API call to "bind" ucharArray Pointer
Move (api_1(..., AddressOf(myUCharArray), ...)) to iRet
While
// API call , to fill up the pointer buffers.
Move (xxxapi( )) to iRet
...
Move (UCharArrayToWString(ucLocation)) to GridData[iRow].sValue[1]
Loop
Send InitializeData GridData
And here is the result I get:
The "reminder" data from the previous row is kept in the result.
The uCharArray actually contains exactly that same data. Because the "bind" operation is only done once, and I need to "re-use" the same array variable thought the loop. so the "reminder" (right-most) is being kept in the array.
When we use UCharArrayToWString() passing it to a regular string, it's shown fine. The "reminder" data is not present.
From the debugger picture , we can see that the tDataSource .sValue is being filled properly. But it may just Local debugger visibility tricking me out.
I am not sure if this is a tDataSource Initialization issue or actually an issue from the automatic conversion from ucharArray to String.