I think you need more details to describe your exact problem as I don't believe the obvious answer is really your question. The obvious answer being: Open up the text file in ANSI, encode the data and write to output file.
How can I by programming, change the encoding of the text file,, I want to open a text file but I couldn't because it's encode in ANSI I want to change it to another encoding type???
try this code, it converts txt files from encoding1 to encoding2
in the following code i am converting any encoding to CodePage1256
using (Stream fileStream = new FileStream(file.FileLocation, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
using (Stream destStream = new FileStream(destinationPath, FileMode.Create, FileAccess.Write,
using (var reader = new BinaryReader(fileStream))
using (var writer = new BinaryWriter(destStream, Encoding.GetEncoding(1256)))
var srcBytes = new byte[fileStream.Length];
reader.Read(srcBytes, 0, srcBytes.Length);
I Developed application in C# with crystal reports and created setup file in third party (Advance) Installer.When i installed my application on client system application is working but ...