 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
byron Guest
|
Posted: Tue Sep 02, 2003 6:05 am Post subject: Assigning WideString to Variant truncates data at first null |
|
|
i've raised a bug report with borland's quality central (5754) but i'm
hoping someone here is able to help me..
starting with delphi 6 rtl2 update when a widestring is assigned to a
variant it is truncated at the first null. this bug exists in delphi
7 as well.
the issue also applies to variants created with varArrayCreate.
due to this bug i'm unable to upgrade to delphi 7 -- i've already paid
for the upgrade, but i can't build my application with it .
wideString to Variant
procedure TForm1.Button1Click(Sender: TObject);
var
temp_str : WideString;
temp_var : Variant;
begin
temp_str := 'test' + #0 + 'test 2';
temp_var := temp_str;
ShowMessage('temp_str length = ' + inttostr(length(temp_str)));
ShowMessage('temp_var length = ' + inttostr(length(temp_var)));
end;
varArrayCreate
procedure TForm1.Button1Click(Sender: TObject);
var
temp_str : AnsiString;
var_param : Variant;
begin
temp_str := 'test' + #0 + 'test 2';
var_param := VarArrayCreate([0,0], varVariant);
var_param[0] := temp_str;
ShowMessage('temp_str length = ' + inttostr(length(temp_str)));
ShowMessage('temp_var length = ' + inttostr(length(var_param[0])));
end;
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|