-1

The following piece of RTF is similar with the RTF some users saved here and there in the last decade using a delphi application via a custom wordpad like little app (modeled after a sample that came with Delphi) that uses the trichedit control. The application has been implemented in Delphi 7 and it run on XP and windows 7.

I saved the rtf snippet to an rtf file and When I open it in word or wordpad, they show symbol characters instead of the text. In my mind, it makes sense since the fcharset used is 2, which is Symbol.

    {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 SansSerif;}{\f1\fnil\fcharset0 Calibri;}}
    {\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\sa200\sl276\slmult1\lang9\f0\fs22 Line 1\f1\par
    }

I looked at a few instances of RTF documents saved in the application, where fcharset2 was used and I have seen the following patterns: fcharset2 SansSerif, fcharset2 Symbol and fcharset2 Romantic. fcharset2 Symbol makes sense for me, it is used for list bullets, for instance.

What I don't understand, hence my posting, is how did fcharset2 Romantic get into the rtf, for instance? I assume that some user had a font called Romantic, he/she typed the text, highlighted it and changed the font to Romantic. But why did the rich edit control save fcharset2 instead of fcharset0?

Thanks

boggy
  • 3,674
  • 3
  • 33
  • 56

1 Answers1

0

\fcharsetN identifies the character set of the font. The value of N is the identifier of the character set. This page lists values for N: http://msdn.microsoft.com/en-us/library/cc194829.aspx

As you can see, a value of 2 indicates SYMBOL_CHARSET. So, whenever you see \fcharset2 that means that the font uses the symbol character set.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
  • That is my understanding as well. What I don't understand is what were the users' actions that triggered the save of \fcharset2 in the rtf. I understand that \fcharset2 is used if you select the Symbol font in the Font dialog, but the other fonts? Could this stuff come from pasting from word? The other thing is that this spans over a decade. The users went through different OSes, different version of software etc. I basically I have no user to ask. I tried a few fonts on my computer: Symbol, Wingdings are saved with \fcharset2 the others with \fcharset0. – boggy Aug 29 '14 at 17:43
  • The font used by whoever created this clearly used symbol charset. – David Heffernan Aug 29 '14 at 17:45
  • I think my confusion comes from the fact that these fonts are obviously designated with the charset 2, however, they contain normal letters, digits etc. I sort of expected that if a font is associated with charset 2, it contains only symbols. – boggy Sep 02 '14 at 21:54
  • So, you have this font? – David Heffernan Sep 02 '14 at 22:36
  • Yes, I managed to find SansSerif and some of the other fonts. After I installed them on my computer the content shows up fine. – boggy Sep 02 '14 at 23:24