Write ANSI text

Nemesis09

Active member
Joined
Jul 25, 2006
Messages
31
Location
NSW, Australia
Programming Experience
Beginner
Hi,

I'm writing a program which needs to write text to an existing text file, which it does.

The problem I've found now is that the text file hase to use ANSI encoding.

The code I'm using to write to the file is:

VB.NET:
[SIZE=2]Microsoft.VisualBasic.FileIO.FileSystem.WriteAllText(Form1.apppath & [/SIZE][SIZE=2][COLOR=#800000]"\employees.dat"[/COLOR][/SIZE][SIZE=2], txtExt.Text & [/SIZE][SIZE=2][COLOR=#800000]","[/COLOR][/SIZE][SIZE=2] & txtName.Text & vbCrLf, [/SIZE][SIZE=2][COLOR=#0000ff]True[/COLOR][/SIZE][SIZE=2],)[/SIZE]
[SIZE=2]
[/SIZE]

I've found that this command supports an extra argument to specify the encoding, but I've looked through the entire table cant find ANSI anywhere.

Any suggestions would be great, thanks.
 
Top Bottom