I have this code to write to a file, it works perfect but I have a case where a client who recorded double quote at the beginning and end of a record. I can understand that by encoding replace the accents, but I do not like me can happen.
EDIT ini.
string recno = string.empty;
recno = "123;1548;1567;10-10-01";
EDIT end.
using (FileStream fsRes = new FileStream(fileSts, FileMode.Append))
{
using (TextWriter twRes = new StreamWriter(fsRes, Encoding.GetEncoding(1252)))
{
twRes.WriteLine(recno);
}
}
Data on file:
Normal behavior:
123;1548;1567;10-10-01
On the client with the problem:
"123;1548;1567;10-10-01"
Edit: I do not know how to explain, but in the same way that the problem started, so I finish. So, sorry but do not know what happened, just hopefully not happen again.
The project I did not change, and the code is that I used as example.
Thank you all for the answers.
@Bobby, I'll see then implement the code that you put.