Suresh Suresh - 3 days ago 4
Vb.net Question

Encoding to be used for ANSI - vb.net

What encoding we need to use to save a file as text file(of type ANSI) - While saving the text file ANSI encoding to be used.
What to be used here, not seeing ANSI as an option

vb.net code - what should be given after Encoding.?

My.Computer.FileSystem.WriteAllText("d:\binary.txt", strTemp, True,System.Text.Encoding.

Answer

ANSI is not an encoding, it is just a generic name for "not Unicode". You typically use Encoding.Default, the same code page as the one your operating system uses. At least all of the programs that run on that machine can read the file without trouble.

Comments