I am writing a program to get data from a Html file, but my problem is that badly written characters that are received in Farsi.
In other languages:
Some characters are called evil for not encodeing
For example, the
The
���� � ����� ������
my code is :
Imports System.IO
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
OpenFileDialog1.ShowDialog()
Dim pfile As String
pfile = OpenFileDialog1.FileName.ToString
Dim a As System.Text.Encoding
a = System.Text.Encoding.UTF8 '' I used other encoding Such as default assci windows-1257 and ... but not fix!!
Dim k_reader As New StreamReader(pfile.ToString, a)
RichTextBox1.Text = k_reader.ReadToEnd
End Sub
End Class