62,269
社区成员
发帖
与我相关
我的任务
分享
int flieLength = FileUpload1.PostedFile.ContentLength;
Stream fs = FileUpload1.PostedFile.InputStream;
byte[] bytes = new byte[fs.Length];
fs.Read(bytes, 0, flieLength);
fs.Close();
char[] Chars = new char[System.Text.Encoding.GetEncoding("utf-8").GetCharCount(bytes, 0, bytes.Length)];
Encoding.GetEncoding("utf-8").GetChars(bytes, 0, bytes.Length, Chars, 0);
String newString = new String(Chars);
Literal1.Text = newString;
//UnicodeEncoding converter = new System.Text.UnicodeEncoding();
//string spcontent = converter.GetString(bytes);
//Response.Write(spcontent);
你想取文本,那用Aspose.Word取吧