Below will not make much sense, but is part of a bigger script. The example below takes the contents of an HTML file, creates a new HTML file and overwrites the source HTML with the same contents
Dim IE As InternetExplorer
Dim HTMLdoc As HTMLDocument
Set IE = New InternetExplorer
With IE
.Navigate filePath
While .Busy Or .ReadyState <> READYSTATE_COMPLETE: DoEvents: Wend
Set HTMLdoc = .Document
End With
Set FSO = CreateObject("Scripting.FileSystemObject")
Set FileToCreate = FSO.CreateTextFile(filePath)
FileToCreate.Write HTMLdoc.DocumentElement.outerHTML
I expected the output to be similar to the source HTML but for some reason, special characters are replaced with replacement characters �
Examples of replaced characters are: ë, °
WHAT I AM LOOKING FOR
Is there a way to prevent special characters to be replaced with replacement characters?