Testing file format

General TRichView support forum. Please post your questions here
Post Reply
robbert
Posts: 1
Joined: Fri Aug 23, 2013 5:48 am

Testing file format

Post by robbert »

Is there a preferred method to retrieve the format of a file/stream. We use LoadRVFFromStream but the function returns true when using a stringstream containing plain html text.

Thanks in advance,
Robbert
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

LoadRVFFromStream should not return True for text files.

There is a method LoadFromStream that autodetects RVF/RTF/plain text.

RVF files must start from '-8 1 ' string.
Post Reply