以下是步骤:
-
创建一个名为.rtf的文件
-
-
在那里编写以下代码以生成包含UTF-8编码内容的RTF文件:
{\rtf1\adeflang1025\ansi
{\fonttbl
{\f26\fbidi \froman\fcharset204\fprq2{\*\panose 010a0502050306030303}Sylfaen;}
}
{\rtlch\fcs1 \af31507 \ltrch\fcs0 \f26 \u<unicode number>\'3f\u<unicode number>\'3f\u<unicode number>\'3 A lot of other text and symbols
like this: + - * _ }
}
例如:
{\rtf1\adeflang1025\ansi
{\fonttbl
{\f26\fbidi \froman\fcharset204\fprq2{\*\panose 010a0502050306030303}Sylfaen;}
}
{\rtlch\fcs1 \af31507 \ltrch\fcs0 \f26 \u1329\'3f\u1330\'3f\u1331\'3f\u1332\'3f - these are first 4 latters of Armenian alphabet}
}
有关详细信息,请参阅UTF-8编码表
here
. RTF规范是
here