I have a question- when I export my data to text, my text file is not created properly- bullets are messed up.
I have tried to use actual bullet or byte bullet; does not work!
Could you advise on what I’m doing wrong?
public void createFile()
{
String Body;
String TAB = "\t";
String RETURN = "\r\n";
Byte[] buffer = new byte[] { (byte)149 };
string bullet = Encoding.GetEncoding(1252).GetString(buffer);
Body = TAB + bullet + TAB + "TEXT1" + RETURN;
Body = Body + "•" + TAB + "TEXT2" + RETURN;
System.IO.StreamWriter file = new System.IO.StreamWriter(@"c:\fname.txt");
file.WriteLine(Body);
file.Close();
}
Ok, I needed to specify different encoding: