Thursday, 22 August 2013

Some characters are called evil for not encodeing

Some characters are called evil for not encodeing

i am .net programmer and i use vb.net 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 html file:my html I get data from it
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
tnx i love stackoverflow.com

No comments:

Post a Comment