Announcements
No record found.
Hi,
I am trying to convert UTF-8 BOM to UTF-8 format in Business Central using XMLport object in AL but am unable to do so. I have already used the TextEncoding property in XMLport, but it takes the UTF-8 BOM format by default. Any suggestions for getting from UTF-8 BOM to UTF-8 format?
I am running my XMLport in the code below.
local procedure Export_File()
var
TempBlob: Codeunit "Temp Blob";
CustomBalance: XmlPort Balance;
OutStreamStr: OutStream;
begin
TempBlob.CreateOutStream(OutStreamStr);
CustomBalance.SetDestination(OutStreamStr);
CustomBalance.InitializeRequest(0D, EndDate);
if CustomBalance.Export() then begin
ExportBlobList.Add(TempBlob);
ExportFileNames.Add(CustomBalance.Filename());
end;
TempBlob.CreateOutStream(OutStreamStr, TextEncoding::UTF8);
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.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
OussamaSabbouh 1,894 Super User 2026 Season 1
YUN ZHU 1,086 Super User 2026 Season 1
Khushbu Rajvi. 626 Super User 2026 Season 1