reading UTF7,UTF8,UNICODE text file

Like may others it seems I'm stuck with reading text files correctly.
How can I change this line

Me.RichTextBox1.Text =My.Computer.FileSystem.ReadAllText(Me.OpenFileDialog1.FileName)

so that it will read correctly notepad files (UTF-7?) and any other valid text file?

I have addedImports System.text to my file but don't really know what to do next. I have tried various forms on encoding.xxxxx but all I get is errors. I have spent 2 days on thisTongue TiedTongue Tied I seem to chase my tail looking at different treads.

ps my files contain extended chars set 128-255

[952 byte] By [samperiau] at [2008-2-8]
# 1
Hi,

Have you tried

Me.RichTextBox1.Text = My.Computer.FileSystem.ReadAllText(Me.OpenFileDialog1.FileName, System.Text.Encoding.UTF7)

Best regards,

HuyN_MS at 2007-9-8 > top of Msdn Tech,Visual Studio Express Editions,Visual Basic 2005 Express Edition...
# 2
Thank you Thank you Thank you etc. I'm sure I have tried it before but I may have been using UTF-7 Tongue Tied
I changed UTF7 to Default and things got even better Big Smile it seems to be compatible with notepad simple text format and also with text from my previous application written in Delphi Smile
samperiau at 2007-9-8 > top of Msdn Tech,Visual Studio Express Editions,Visual Basic 2005 Express Edition...