情况描述:image字段中存放着utf32编码格式的含有中文的字符串,需要在delphi5中把它读出来,但目前用以下的代码读出的是乱码,该如何解决?var
  objstream : TStream;
  i,iLength : integer;
  ByteArray : array of  Byte;
  strsql : string;
begin
  try
    objStream := Aobjcds.CreateBlobStream(Aobjcds.FieldByName('SrcDataSQL'), bmRead);//image类型的字段
    iLength := objStream.Size;
    SetLength(ByteArray , iLength);
    objStream.Position := 0;
    for i := 0 to iLength - 1 do begin
      objStream.Read(ByteArray [i], 1);
    end;
    strsql := WideCharToString(PWideChar(ByteArray ));
    result := strsql;
  finally
    objStream.Free;
  end;
end;