Unicode RTF text in RichEdit

前端 未结 3 1522
孤独总比滥情好
孤独总比滥情好 2020-12-15 11:40

I\'m having trouble getting a RichEdit control to display unicode RTF text. My application is Unicode, so all strings are wchar_t strings.
If I create the control as \"R

3条回答
  •  隐瞒了意图╮
    2020-12-15 12:29

    Take a look at \uN literal in rtf specification so you have to convert your wide string to string of unicode characters like \u902?\u300?\u888? http://www.biblioscape.com/rtf15_spec.htm#Heading9 The numbers in this case represent the characters decimal code and the question mark is the character which will replace the unicode char in case if RichEdit does not support unicode (RichEdit v1.0).

    For example for unicode string L"TIME" the rtf data will be "\u84?\u73?\u77?\u69?"

提交回复
热议问题