I have the following code which will read "normal" characters from any textfile just fine:
But my problem is, that it does not read special characters.Code:Dim oRead As StreamReader Dim oFile As File Dim currentLine As System.String oRead = oFile.OpenText(Global.directory) While oRead.Peek <> -1 currentLine = oRead.ReadLine() If Not File.Exists(Global.homedirectory + "\teste.txt") Then Dim oWrite As New System.IO.StreamWriter(Global.homedirectory + "\teste.txt") oWrite.WriteLine(currentLine) oWrite.Close() End If MessageBox.Show(currentLine) End While oRead.Close()
My textfile contains: "ašššb" . But Readline() reads only "ab".
I thought UTF-8 supports foreign characters? But apparently, it does not.
Any help is appreciated.
Thanx,
Usul




Reply With Quote