如何设置为utf-8 ............. [英] how to set to utf-8.............
本文介绍了如何设置为utf-8 .............的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将输出设置为utf-8
how do i set the ouput to utf-8
var sw = new StringWriter();
document.Open();
var hTextWriter = new HtmlTextWriter(sw);
LabelFirstName.RenderControl(hTextWriter);
LabelLastName.RenderControl(hTextWriter);
RepeaterStrongestSkillsMax2.RenderControl(hTextWriter);
LabelAbout.RenderControl(hTextWriter);
String strHtml1 = sw.ToString();
var styles = new iTextSharp.text.html.simpleparser.StyleSheet();
var hw = new iTextSharp.text.html.simpleparser.HTMLWorker(document);
hw.Parse(new StringReader(strHtml1));
document.Close();
推荐答案
请参阅:
http://stackoverflow.com/questions/1564718/using-stringwriter-for-xml-serialization [ ^ ]
http://devproj20.blogspot.com/2008/02/writing-xml- with-utf-8-encoding-using.html [ ^ ]
http://rlacovara.blogspot.com/2011/02/how-to-create-xml-in-c-with-utf-8.html [ ^ ]
http://social.msdn.microsoft.com/Forums/en-US/asmxandxml/thread/90af541c-1acf-49df-9ace-55bf241170ed/ [< a href =http://social.msdn.microsoft.com/Forums/en-US/asmxandxml/thread/90af541c-1acf-49df-9ace-55bf241170ed/target =_ blanktitle =New Window> ^ ]
http://msdn.microsoft.com/en-us/library/system.text.encoding.utf8%28v=vs.80%29.aspx [ ^ ]
http://msdn.microsoft.com/en-us/ library / system.text.utf8encoding.aspx [ ^ ]
See these:
http://stackoverflow.com/questions/1564718/using-stringwriter-for-xml-serialization[^]
http://devproj20.blogspot.com/2008/02/writing-xml-with-utf-8-encoding-using.html[^]
http://rlacovara.blogspot.com/2011/02/how-to-create-xml-in-c-with-utf-8.html[^]
http://social.msdn.microsoft.com/Forums/en-US/asmxandxml/thread/90af541c-1acf-49df-9ace-55bf241170ed/[^]
http://msdn.microsoft.com/en-us/library/system.text.encoding.utf8%28v=vs.80%29.aspx[^]
http://msdn.microsoft.com/en-us/library/system.text.utf8encoding.aspx[^]
这篇关于如何设置为utf-8 .............的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文