Page 2 of 2

Re: Convert richview files to rtf

Posted: Tue Jul 25, 2017 8:08 pm
by Sergey Tkachenko
The reason of this problem is definitely a mismatch of Unicode/Ansi text.
3 things must be in sync:
- Unicode property of text style
- rvioUnicode in ItemOptions
- text format ("raw Unicode"/Ansi)

I thought something is wrong is at the moment of insertion, but this code seems to be correct.
Try using RVInsertString (or RVInsertStringA/RVInsertStringW) from RVInsertItems.pas (if you want to insert in existing paragraph, ParaNo parameter must be -1) instead of this code.

There is another possibility: styles are changed after field replacement.
If using RVInsertString does not help, please create a simple project reproducing this problem and send it to me.