Hulk_1
Hulk_1

Reputation: 3

How to read a text file with regional language from vb.net

I m trying to read the text file with regional language and and display in the message box. But text is converted into some other standard and displayed. How to display text in message box as it is in text file

Upvotes: 0

Views: 132

Answers (1)

Sukhi
Sukhi

Reputation: 14145

Assuming the regional characters are covered in the Unicode, you might want to try the following :

Dim textFromFile as string = IO.File.ReadAllText("C:\regionalfile.txt", System.Text.Encoding.Unicode)

(Or UFT32, UFT8, UFT7, BigEndianUnicode or default. Default is ANSI.)

Upvotes: 1

Related Questions