Question: Weird webding error

  • Thread starter Thread starter VB Programmer
  • Start date Start date
V

VB Programmer

I have an html file that consist of this only:

<SPAN style="FONT-SIZE: 7pt; COLOR: #990033"></SPAN></FONT><SPAN
style="COLOR: #990033; FONT-FAMILY: Webdings">Ý</SPAN>
My Webding should be to the left<BR>

I have code which, for reasons beyond this question, opens the file, puts
the full html contents in a string, then does other stuff.

When I open the file and read the html into the string the webding character
"Ý" disappears! Any ideas why?

This is how I read the file:

Private Function ParseHtml(ByVal strHtmlFileName As String, ByVal strHtml As
String) As ArrayList
' Purpose: Given an HTML filename, open it, parse it out based on
the reserved parsing delimiters
Try
Dim sr As New
System.IO.StreamReader(ConfigurationSettings.AppSettings("MyDir") &
strHtmlFileName)
If strHtml = "" Then strHtml = sr.ReadToEnd ' Here strHtml
contains everything BUT the webding character!
:
:
:

At this point strHtml contains ONLY this:
<SPAN style="FONT-SIZE: 7pt; COLOR: #990033"></SPAN></FONT><SPAN
style="COLOR: #990033; FONT-FAMILY: Webdings"></SPAN>
My Webding should be to the left<BR>

Notice that the "Ý" disappears. I'm confused. Ideas? Thanks!
 
i believe because webdings font are a special character set.
have you tried reading it as unicode for instance?
 
No. How can I do that? Thanks.
Alvin Bruney said:
i believe because webdings font are a special character set.
have you tried reading it as unicode for instance?

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
VB Programmer said:
I have an html file that consist of this only:

<SPAN style="FONT-SIZE: 7pt; COLOR: #990033"></SPAN></FONT><SPAN
style="COLOR: #990033; FONT-FAMILY: Webdings">Ý</SPAN>
My Webding should be to the left<BR>

I have code which, for reasons beyond this question, opens the file, puts
the full html contents in a string, then does other stuff.

When I open the file and read the html into the string the webding
character
"Ý" disappears! Any ideas why?

This is how I read the file:

Private Function ParseHtml(ByVal strHtmlFileName As String, ByVal strHtml
As
String) As ArrayList
' Purpose: Given an HTML filename, open it, parse it out based on
the reserved parsing delimiters
Try
Dim sr As New
System.IO.StreamReader(ConfigurationSettings.AppSettings("MyDir") &
strHtmlFileName)
If strHtml = "" Then strHtml = sr.ReadToEnd ' Here strHtml
contains everything BUT the webding character!
:
:
:

At this point strHtml contains ONLY this:
<SPAN style="FONT-SIZE: 7pt; COLOR: #990033"></SPAN></FONT><SPAN
style="COLOR: #990033; FONT-FAMILY: Webdings"></SPAN>
My Webding should be to the left<BR>

Notice that the "Ý" disappears. I'm confused. Ideas? Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top