Character encoding
-
Hi. I'm a C# beginner and I am writing text to a file, but the reciever of the file wants it to be encoded in ISO/IEC 8859-1. I was earlier using System.IO.Streamwriter but I dont know how to do this with that class. Does anybody know hoe to do this in C#.Net Robert
-
Hi. I'm a C# beginner and I am writing text to a file, but the reciever of the file wants it to be encoded in ISO/IEC 8859-1. I was earlier using System.IO.Streamwriter but I dont know how to do this with that class. Does anybody know hoe to do this in C#.Net Robert
System.Text.Encoding.GetEncoding("iso-8859-1"); Check out the documentation for the Encoding class in the VS 2005 help.
-
Hi. I'm a C# beginner and I am writing text to a file, but the reciever of the file wants it to be encoded in ISO/IEC 8859-1. I was earlier using System.IO.Streamwriter but I dont know how to do this with that class. Does anybody know hoe to do this in C#.Net Robert
-
I haven't done it myself yet, but you might try this:
StreamWriter text = new StreamWriter("test.txt", false, Encoding.GetEncoding("iso-8859-1"));
regardsYes, thanks. It's working now!