Hello!
When oCodepage is set to 0 XMLOutputFormat writes an XML with no encoding attribute in <?xml..> section. According to standard that must be treated as UTF-8 by a parser which might result to pasring errors on non-english characters. XMLOutputFormat must write the name of the current system encoding, for instance
<?xml version="1.0" encoding="windows-1251" standalone="yes" ?>
.