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

Display Unicode characters(i.e chinese characters) in Richtextbox control

$
0
0

Hi,

I have a Richtextbox control & want to display chinese characters present in a label upon a button click, which displays "?" question marks instead within that richtextbox control.

i am using the below code on button click event:

privatevoid btnEncode_Click(object sender, EventArgs e)


{

string

m_rtfBase = "{\\rtf1\\ansi\\deff0{\\fonttbl{\\f0\\fnil\\fcharset0 Microsoft Sans Serif;}}{\\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.SelectedRtf = m_rtfBase + lbl.Text +

@"\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>