Try an alternative:
RichTextBox1.Text = File.ReadAllText("D:\Backup\AppList.txt")
Or change the encoding of AppList.txt, if possible. Use “UTF-8 with signature” encoding.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I have text file which looks like as follows:
Now I used Rich Text Box to display the contents of this text file on VB form as:
RichTextBox1.LoadFile("D:\Backup\AppList.txt", RichTextBoxStreamType.PlainText)
I have noticed two strange characters (ÿþ) appended as:
or sometimes on top as:
Any thoughts why this strange characters appeared and how to get rid of them?
Try an alternative:
RichTextBox1.Text = File.ReadAllText("D:\Backup\AppList.txt")
Or change the encoding of AppList.txt, if possible. Use “UTF-8 with signature” encoding.