Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

Display Chinese Characters in Richtextbox control

$
0
0

Hi,

I have chinese characters in a string & want to display the same in Richtextbox control, but i am getting "?" instead. Do i need to change those unicode characters(i.e chinese characters) before assigning it to richtextbox's rtf. or does my rtf_header has some problem/chnage to support unicode display in richtextbox??

my code:

string s = "你好";

stringrtf_header = "{\\rtf1\\unicode\\deff0{\\fonttbl{\\f0\\fnil\\fcharset0 Arial Unicode MS;}}{\\colortbl \\red0\\green0\\blue0;\\red255\\green0\\blue255;\\red0\\green0\\blue255;\\red255\\green0\\blue0;\\red255\\green165\\blue0;\\red0\\green198\\blue255;\\red0\\green192\\blue0;\\red116\\green116\\blue116;}\\cf0\\ulnone";

rtb.Rtf = rtf_header + s +

@"\par}";



Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>