web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

How can I export file in UTF-8 encoding without BOM (TextStreamIo file)

(1) ShareShare
ReportReport
Posted on by 89

I currently have a TextStreamIo file export but it is exporting with the BOM.

I used this code below with the 65001 codepage to instantiate my TextStreamIo in the UTF-8 format, but this is exporting a UTF-8 BOM file and I need to drop the BOM through code

 

int ExportBank(BankAccountTable BankAccountTable)
{

System.IO.Stream stream;
StreamIo file;
TextStreamIo io;
System.IO.StreamReader reader;
//65001 is the codePage for UTF-8 encoding
Io = TextStreamIo::constructForWrite(65001);

write ...

Export...

}

I have also tried following Martins reply with his code in this post:    

But I could not get the errors to go away. 

I have the same question (0)
  • tristansenk99 Profile Picture
    89 on at
    RE: How can I export file in UTF-8 encoding without BOM (TextStreamIo file)

    Anyone done this before? Thanks

  • VO-24012334-0 Profile Picture
    10 on at
    How can I export file in UTF-8 encoding without BOM (TextStreamIo file)
    Does anyone have the solution for this?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 1,882

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 794 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 525 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans