The SAX-writer object outputs the XML document in the codepage specified by the ENCODING attribute (UTF-8 by default). However, the character input to the document might use several codepages, as described:
A CHARACTER variable uses the codepage set by the ABL parameter -cpinternal
A LONGCHAR variable uses the codepage individually set for it
The SAX-writer handles these issues automatically by converting all character data to the UTF-16 codepage during processing before converting the XML output to the correct specified codepage.