积极答复者
RichTextBox中文乱码

问题
答案
-
你好:
利用RichTextBox的机制来生成RTF文档内容,然后传入RTF格式内容给控件
http://www.cnblogs.com/wuhuacong/archive/2010/07/20/1781378.html
或在读取文件内容时加上编码
StreamReader sr = new StreamReader(fs, Encoding.Default); string strline = sr.ReadLine(); StringBuilder sb = new StringBuilder(); while (strline != null) { strline = sr.ReadLine(); sb = sb.Append(strline + "\n"); } sr.Close(); richTextBox1.Text = sb.ToString();
http://www.cnblogs.com/wind8250/archive/2008/02/25/1080777.html
http://www.cnblogs.com/symbol441/archive/2007/11/01/945857.html
希望对你有所帮助。
I am here!- 已标记为答案 BoberSongModerator 2010年11月1日 7:11
-
hi,
Pls reference this: http://tc.0728.org/News/306367.html
this articale is about "richtextbox無法輸入中文,讀文件出現亂碼 "...
richtextbox無法輸入中文,讀文件出現亂碼
richtextbox無法輸入中文,讀文件出現亂碼"
逐步學習,逐夢踏實;腳步要踩穩,這樣下一步才不會跌倒。 http://www.dotblogs.com.tw/nobel12- 已标记为答案 BoberSongModerator 2010年11月1日 7:12
全部回复
-
你好:
利用RichTextBox的机制来生成RTF文档内容,然后传入RTF格式内容给控件
http://www.cnblogs.com/wuhuacong/archive/2010/07/20/1781378.html
或在读取文件内容时加上编码
StreamReader sr = new StreamReader(fs, Encoding.Default); string strline = sr.ReadLine(); StringBuilder sb = new StringBuilder(); while (strline != null) { strline = sr.ReadLine(); sb = sb.Append(strline + "\n"); } sr.Close(); richTextBox1.Text = sb.ToString();
http://www.cnblogs.com/wind8250/archive/2008/02/25/1080777.html
http://www.cnblogs.com/symbol441/archive/2007/11/01/945857.html
希望对你有所帮助。
I am here!- 已标记为答案 BoberSongModerator 2010年11月1日 7:11
-
hi,
Pls reference this: http://tc.0728.org/News/306367.html
this articale is about "richtextbox無法輸入中文,讀文件出現亂碼 "...
richtextbox無法輸入中文,讀文件出現亂碼
richtextbox無法輸入中文,讀文件出現亂碼"
逐步學習,逐夢踏實;腳步要踩穩,這樣下一步才不會跌倒。 http://www.dotblogs.com.tw/nobel12- 已标记为答案 BoberSongModerator 2010年11月1日 7:12
-
StreamWriter LogSW = new StreamWriter(".\\test.txt", true,System.Text.Encoding.Default);
同时可参考这里:
http://www.cnblogs.com/wuhuacong/archive/2010/07/20/1781378.html
http://www.cnblogs.com/2gua