hi,
is there way to load UTF16 encoded RTF stream into TRichView?
it only support LoadRTFFromStream() which is single-byte stream.
Double-Byte RTF stream?
-
- Site Admin
- Posts: 17566
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Normally, RTF contains only characters with codes <127 (except for the mode when pictures are saved in a binary form, which is rarely used).
So, RTF data can be easily converted from UTF16 to ANSI.
Just load this RTF in WideString, assign this WideString to String (a conversion will be performed), save this String to Stream, load RTF from the stream.
This techinque is used by new versions of TRichView when loading RTF from unicode memo fields, supported by Delphi 2006+ (for example, from MS Access memos).
So, RTF data can be easily converted from UTF16 to ANSI.
Just load this RTF in WideString, assign this WideString to String (a conversion will be performed), save this String to Stream, load RTF from the stream.
This techinque is used by new versions of TRichView when loading RTF from unicode memo fields, supported by Delphi 2006+ (for example, from MS Access memos).