AddPictureEx with metafile, unicode shown as question marks

General TRichView support forum. Please post your questions here
Post Reply
alex-beka
Posts: 1
Joined: Tue Mar 30, 2010 9:38 am

AddPictureEx with metafile, unicode shown as question marks

Post by alex-beka »

Hi,

i have the problem that the generated .rtf file is showing question mark letters instead of unicode(cyrillic, japanese, chinese letters); has AddPictureEx Problems with metafiles including unicode or is it the SaveRTF method?

Code: Select all

mf := TMetaFile.Create;
mf.LoadFromFile('metafile.wmf');
richViewEdit.AddPictureEx('Script', mf, pCenter, rvvaBaseline);
richViewEdit.SaveRTF('report.rtf', false)
the orginal metafile (in the software IrfanViewer the metafile and the unicode text are shown correctly):
http://www.beka-consulting.com/assets/CAST/metafile.wmf

see the difference, question marks, in the generated rtf file: http://www.beka-consulting.com/assets/CAST/report.rtf

thanks in advance,
regards,
Alex
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Exclude rvrtfSaveEMFAsWMF from RTFOptions property.

Pro: MS Word or TRichView will be able to load this metafile with all Unicode text.
Contra: some less capable applications (such as WordPad, at least, in WinXP), will not be able to load this picture at all.
Post Reply