Clipboard.SetText(String, TextDataFormat.Html) 乱码
C#使用Clipboard.SetText(String, TextDataFormat.Html) 将HTML数据写入到剪切板中,英文和符号可以正常显示超链接,但是中文会显示乱码,尝试过转码,还是乱码,请问如何解决?
Set的文本如下:
Version:0.9
StartHTML:0000000178
EndHTML:0000000908
StartFragment:0000000216
EndFragment:0000000870
SourceURL:SourceURL:http://www.sbxinwen.com
<html>
<body>
<!--StartFragment-->
<a href= "http://www.sbxinwen.com " target= "_blank " style= "margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; color: rgb(0, 0, 0); font-weight: normal; font-size: 12px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: center; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); "> 傻逼 </a>
<!--EndFragment-->
</body>
</html>
------解决方案--------------------