Issue with TAdvRichEditorMiniHTMLIO..AsString

Hello dear TMS team!

After installing VCL Compo Lib V I got the following problem with
TAdvRichEditorMiniHTMLIO..AsString. For example I get this result:

<HTML><BODY><B>IMPRINT<BR><BR>Author</B>: its me<BR><B>more info</B>: none </BODY></HTML> #0#0#0#0#0

Unfortunately I cant remember my previous version of installation.
With that I've got another "clean" result (without one blank and five #$00).

Due to this, I've installed the newest version, but same "unclean" result.
If the first letter in "TDBAdvRichEditor" is not bold the output of TAdvRichEditorMiniHTMLIO..AsString
has a leading blank. It looks like this:

In TDBAdvRichEditor is no leading and no trailing blank after the text.

As a work-around I use "trim( TAdvRichEditorMiniHTMLIO..AsString )" which deletes all
trailing #$00 and the blank.

This result is independend from the text in the editor even if it is empty.
It is allways reproducable.

Hope you can reproduce it too.


It is unclear what is causing this. I cannot reproduce this.

I cannot see a reason for these #0 chars. Internally in generating HTML, we do not use #0.
Only special characters being used are #13 and #10.
Also, in the internal generation code, last step is that </BODY> and </HTML> tags are added to a stringlist:


and then this stringlist is converted to a string with sl.Text; so I can't see this being responsible for adding #0 chars.
Where exactly or via which way do you see these #0 chars?

Hello Bruno,
thanks for your reply!

Perhaps the data stored in DB are not clean or the data read back from DB?
Do you have an advice how to check the data there?
I'm using FireDAC/MySQL and Delphi XE5.

Is it upon storing you see the #0 chars appended or after reading it back?

Hello Bruno, thank you.

Maybe I'm using TDBAdvRichEditor/TAdvRichEditorMiniHTMLIO not in the right way:

I've placed a TDBAdvRichEditor on my form,
connect it with datasource/datafiled,
placed a TAdvRichEditorMiniHTMLIO on the form,
connect it to the above Editor by assigning the RichEditor property.

After saving/updating the dataset, I'm reading "MiniHTMLIO.AsString".

The datafield for richEditor ist defined as "blob".
Dumping the data it seems there are lots of control characters
like #$0B, #$0F, #$02, #$08, #$10 and #$00.

Unfortunately I have no idea which of the chars are valid and which are not.
But the representation of the text in the editor is always correct.

I know, you don't have to solve my problems, but what I can check next?

I'd suggest to first try to isolate this from your dataset and see that if you persist in a regular TXT file, if these strange characters also appear.