views:

72

answers:

2

Recently, i'm very confused about the RTF format. I check the RTF 1.6 spec from MSDN, which is native supported in .Net. RTF 1.6 will support Unicode by \uN, and for ANSI, RTF will support multiple byte language via codepage. If we use RichTextBox.RTF to retrieve the RTF format, which format will be returned? Unicode? or ANSI multiple byte?

System language configuration depended? or anything else?

+1  A: 

String is always Unicode in .NET.

leppie
Sorry for confusion, what i want to known is,RTF spec have two options to support east-asian language. The one is, most like DBCS(double byte), for example:{\rtf...\viewkind4\uc1\pard\lang2052\f0\fs24\'d6\'d0\'b9\'fa\lang1033\f1\par}d6d0 compose a double byte char.The other one is, escape to Unicode. For example:{\rtf...\\viewkind4\uc1\pard\lang1041\f0\fs24\u20013?\u22269?\u27979?\u35797?\u25289?\par}}\u20013? is a utf-16 value for a chinese char.So, which will return in RichText.rtf?
Winston
A: 

solved.. That's because we disable RichTextBox.LangOptions.AutoFont, which will cause the RTF return unicode format.

Winston