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

Announcements

No record found.

News and Announcements icon
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. 

  • tristansenk99 Profile Picture
    89 on at

    Anyone done this before? Thanks

  • VO-24012334-0 Profile Picture
    10 on at
    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
Martin Dráb Profile Picture

Martin Dráb 495 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 432 Super User 2026 Season 2

#3
CU10121822-0 Profile Picture

CU10121822-0 366

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans