I am having a problem exporting an XMLPort from the format 'Xml' to UTF-8 format. I have already tested this in many ways and each time I get UTF-16 format.
Test 1
xmlport 90000 "TEST EXPORT UTF"
{
Format = Xml;
Caption = 'TEST EXPORT UTF';
Direction = Export;
UseRequestPage = false;
schema
{
textelement(RootNodeName)
{
tableelement(Item; Item)
{
fieldelement(No; Item."No.")
....
}
pageextension 90016 "test export" extends "Item List"
{
actions
{
addafter(History)
{
action(ExportItems)
{
Caption = 'Export Items';
Promoted = true;
PromotedCategory = Process;
Image = Export;
ApplicationArea = All;
trigger OnAction()
begin
testxml.TextEncoding(TextEncoding::UTF8);
testxml.Run();
end;
}
}
}
var
testxml: XmlPort 90000;
}
Can anybody suggest a solution so the final XML has UTF-8 format ?