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;
end;