How to export CSV file using x++ in UTF8 format without BOM?
Can someone help with sample code here?
*This post is locked for comments
How to export CSV file using x++ in UTF8 format without BOM?
Can someone help with sample code here?
*This post is locked for comments
There is an code sample in that thread, create you file as you do using commaTextIo and then rewrite it using new encoding System.IO.File::WriteAllText(filename, System.IO.File::ReadAllText(filename), encoding);
System.IO.File::WriteAllText(@'C:\test.txt', "Data 123", encoding);
This writes the file when I have simple string like one shown above. When I have multiple lines in my file I am trying concatenating multiple lines using '\n' to make one big string so I can use this code. But that results in creating a file with 0kb. Please suggest.
Please check this thread community.dynamics.com/.../220574 discussing similar question.
Thanks for your reply Andre. I am trying to develop a custom transaction data CSV export. I am required to export the CSV in UTF8 format with out BOM(Byte Order Mark).
I am exporting the csv using CommaTextIo io = new TextIo(filename, 'W', 65001);
Now trying to figure out how I can export the same without BOM.
Hi SomuAx2012,
Please elaborate. What exactly do you mean with BOM here? What data needs to be exported and where exactly do you need help?
André Arnaud de Cal...
292,489
Super User 2025 Season 1
Martin Dráb
231,305
Most Valuable Professional
nmaenpaa
101,156