Hi,
I have a small VB.Net program that reads in an HTML file using a
FileStream (this file was created by MS Word "Save as HTML" feature),
uses regular expressions to remove all unwanted code and then re-writes
the file.
It works fine but when I execute this on a french web page...the
StreamWriter removes all of the french characters. Here's a piece of the
code:
Dim filename As String = txtFilename.Tex t.ToString
Dim sr As StreamReader
sr = File.OpenText(f ilename)
Dim textstream As String = sr.ReadToEnd()
sr.Close()
Dim newtext As String
newtext = CleanHTML(texts tream)
Dim fs As New FileStream(Outp utFilename, FileMode.Create ,
FileAccess.Writ e)
Dim sw As New StreamWriter(fs )
' I've also tried:
'Dim sw as New StreamWriter(fs , System.Text.Enc oding.UTF8)
sw.WriteLine(ne wtext)
sw.Close()
I'm kinda new to .Net Development...d oes anyone see what's wrong here?
Thanks
*** Sent via Developersdex
http://www.developersdex.com ***