We are using DevEx vcl-Components as visual components.
I have a small sample project, that shows what is happening right now.
I'll provide this in a several message.
Just to describe it here:
DevEx is reading and writing rtf to TBlobField by using TStringstream with default encoding, what should be fine because rtf is 7-Bit ASCII.
We are using TBlob in Aurelius to save datas.
But as you describe in docs we should access TBlob using AsUnicodeString.
Thanks for the example. Since you are using raw blob content, you should not mix it with string. This is the correct way to load the data from the blob:
// DevEx recieves the Dataset to show Datas within Grid:
// reading the data is also correct, because rtf is 7Bit ASCII...
hStream := TStringStream.Create('', TEncoding.Default);
TBlobField(hDataset.FieldByName('Blob')).SaveToStream(hStream);
hStream.Position := 0;
reOut.Lines.LoadFromStream(hStream);
You should maybe open request in DevE support system then. I don't know what is your dataset field type. You are treating it as string but using it as bytes. You have to pick one option.
If you are going to treat it as string, then use a string property, or flag your blob property with [DBTypeWideMemo] or [DBTypeMemo], and then make sure your dataset field is a memo or wide memo field. If you want to treat it as blob, then keep it as TBlob, don't add any attribute, and make sure your dataset field type is ftBlob.
Since this thread was closed, @Silber_Felix sent us an additional follow up for this topic in private. I appreciate his effort to share information that might be useful for other users. Here it is for the record:
I would like to add some new insights to this issue.
we made a mistake by using ftWideString as TBlobField.BlobType instead of ftFmtBlob on one side...
In another case we did not even set any BlobType-Attribute, so that's why this mixed Ansi and Unicode behind...