Hi - My project presents rtf data (stored in Unicode format via ElevateDB Table) and is fetched via DevExpress Editor cxDBRichEdit (bound to the Table CLOB Field) using the cxDBRichEdit.Properties.StreamModes:= [resmUnicode] for access.
The editing fetch/read/write cycle visually works correctly via the cxDBRichEdit - however once the Editor has touched the data we get Rave Print Issues (I believe that further up the chain it is a TRichEdit / RichEdit Unicode / UTF8 conflict).
When printing the rtf data with Rave we sometimes get random intermitant jibberish appended to the end of the valid data printout (I believe a Unicode / UTF8 conflict).
Speaking to both DevExpress and ElevateDB they assure me it is not a problem with their code and claim that it has something to do with the Delphi TRichEdit OR Microsoft RichEdit OR Both.
We know that the DevExpress cxDBRichEdit Editor is a wrapper arround the Delphi TRichEdit which in turn is a wrapper around Microsofts RichEdit - my code as follows:-
MemoBuf.BaseReport:= Sender as TBaseReport;
Code used to fetch rtf data from cxDBRichEdit Editor using TEncoding.UTF8 because TEncoding.Unicode FAILS:-
strStream:= TStringStream.Create('', TEncoding.UTF8);
Code used to fetch rtf data from Table using TEncoding.Unicode (TEncoding.UTF8 FAILS as it should):-
bs:= Query1.CreateBlobStream(Query1.FieldByName('Notes'), bmRead);
sStream:= TStringStream.Create('', TEncoding.Unicode);
So, somewhere within TRichEdit and/or RichEdit the string encoding is being confused.
Would someone be so kind as to show me how to force the Delphi TRichEdit OR Microsoft RichEdit (OR Both) to use Unicode and not UTF8 - Thanks in advance.