阅读文字 [英] Reading Text
本文介绍了阅读文字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用StreamReader从HTML文件中读取文本并将其显示为
标签控件中页面的一部分。购买它不会显示字符:
?,ó,ú等
请帮助。
谢谢
I am using a StreamReader to read text from an HTML file and display it as
part of a page in a Label Control. Buy it is not displaying characters as:
?, ó, ú, etc.
Please Help.
Thanks
推荐答案
这是我正在使用的代码:
Dim sr As StreamReader = File。 OpenText(SourceHTMLFile)
Dim input As String
input = sr.ReadToEnd
lblContent .Text ="< BR>< BR>" &安培;输入
sr.Close()
我知道读取UTF,如何读取它以显示所有字符?
谢谢
" T Cordon" < TC ****** @ hotmail.com>在消息中写道
news:ez ************** @ TK2MSFTNGP10.phx.gbl ...
This is the code I am using:
Dim sr As StreamReader = File.OpenText(SourceHTMLFile)
Dim input As String
input = sr.ReadToEnd
lblContent.Text = "<BR><BR>" & input
sr.Close()
I know that reads UTF, how can I read it so it displays all the characters?
Thanks
"T Cordon" <tc******@hotmail.com> wrote in message
news:ez**************@TK2MSFTNGP10.phx.gbl...
我正在使用StreamReader从HTML文件中读取文本并将其显示为Label Control中页面的一部分。购买它不会显示字符:
?,ó,ú等。
请帮助。
谢谢
I am using a StreamReader to read text from an HTML file and display it as
part of a page in a Label Control. Buy it is not displaying characters as:
?, ó, ú, etc.
Please Help.
Thanks
在文章< ez ************** @ TK2MSFTNGP10.phx.gbl>中, tc ****** @ hotmail.com
说...
In article <ez**************@TK2MSFTNGP10.phx.gbl>, tc******@hotmail.com
says...
我正在使用StreamReader从HTML文件中读取文本并将其显示为Label Control中页面的一部分。购买它不会显示字符:
?,ó,ú等。
I am using a StreamReader to read text from an HTML file and display it as
part of a page in a Label Control. Buy it is not displaying characters as:
?, ó, ú, etc.
确保您正在使用HTML编码HTML数据
HttpUtility.HtmlEncode方法。
-
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele >
HTML文件是使用Word创建的,并且它本身正确显示
。
猜猜问题是阅读它还是它还有什么呢?
谢谢
Patrick Steele [MVP]" < PA ***** @ mvps.org>在消息中写道
新闻:MP ************************ @ msnews.microsoft.c om ...
The HTML file is created using Word, and by itself it is displayed
correctly.
Guess the problem is reading it or what else can it be?
Thanks
"Patrick Steele [MVP]" <pa*****@mvps.org> wrote in message
news:MP************************@msnews.microsoft.c om...
在文章< ez ************** @ TK2MSFTNGP10.phx.gbl>中, tc ****** @ hotmail.com
说...
In article <ez**************@TK2MSFTNGP10.phx.gbl>, tc******@hotmail.com
says...
我正在使用StreamReader从HTML文件中读取文本并显示它
作为Label Control中页面的一部分。购买它不会显示字符
为:?,ó,ú等。
I am using a StreamReader to read text from an HTML file and display it as part of a page in a Label Control. Buy it is not displaying characters as: ?, ó, ú, etc.
确保您使用
HttpUtility.HtmlEncode方法。
-
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele
这篇关于阅读文字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文