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.
Monitoring during loading rtf-file?
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
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.
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.