ASP.NET C# Export Void

I inherited a routine that builds an export file for a feed to a vendor.  

I've been told that the routine is placing a Unicode leading character "space" on the header line...which I can't see.  Does anything in the script I have attached shopw a leading character?

Thanks....
private void ExportLRE()
  {
string[] arrFields = new string[]{"MLS","Bedrooms","Bathrooms","SquareFeet","Title","Category","Location","PriceUnits","Price","PriceComment","CompleteDescription","City","State","Zip","totalNumberOfImages","Continent","Country","Email","LRE_Type"};
 
XmlTextWriter writer = new XmlTextWriter(Server.MapPath("listings.txt"), Encoding.UTF8);
 
			writer.WriteRaw("\"MLS\",\"Bedrooms\",\"Bathrooms\",\"SquareFeet\",\"Title\",\"Category\",\"Contact\",\"PriceUnits\",\"Price\",\"PriceComment\",\"Description\",\"City\",\"State\",\"Zip\",\"ImageFilename1\",\"ImageFilename2\",\"ImageFilename3\",\"ImageFilename4\",\"ImageFilename5\",\"ImageFilename6\",\"ImageFilename7\",\"ImageFilename8\",\"ImageFilename9\",\"ImageFilename10\",\"ImageFilename11\",\"ImageFilename12\",\"Continent\",\"Country\",\"Email\",\"Type\"" + "\n");

Open in new window

lrbristerAsked:
Who is Participating?
 
VBRocksConnect With a Mentor Commented:
Try using System.Text.Encoding.Default (Which for me is "Windows-1252" - "Western European
(Windows)"), instead of Encoding.UTF8.

XmlTextWriter writer = new XmlTextWriter(Server.MapPath("listings.txt"), System.Text.Encoding.Default);

VBRocks
MS MVP

0
All Courses

From novice to tech pro — start learning today.