Monitoring during loading rtf-file?

General TRichView support forum. Please post your questions here
Post Reply
Jim Knopf
Posts: 241
Joined: Mon Dec 30, 2013 10:07 pm
Location: Austria
Contact:

Monitoring during loading rtf-file?

Post by Jim Knopf »

I have to work in my application with preset 'use predefined set of styles' in TRichviewEdits Setiings. For special situations I installed 2 additional text styles with a second charset, RUSSIAN_CHARSET e.g. (normal + italic)

One project consits out of many textfiles (rtf).

If I change the projects charset to another, EASTEUROPE_CHARSET e.g., then all textfiles set those special items to DEFAULt_CHARSET, because they don't know EASTEUROPE_CHARSET but only RUSSIAN_CHARSET - logically.

I would like to be able to control the import during LoadRTF that I can convert further RUSSIAN_CHARSET to now EASTEUROPE_CHARSET.
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Unfortunately, the function for matching character attributes from RTF to trichview styles is hard-coded.
It is TRVRTFReaderProperties.FindBestStyleNo (RVRTFProps.pas). It returns a similarity value.
If you look at it, you will see that if charsets are different, it prefers matching to DEFAULT_CHARSET.
Post Reply