Fix encoding usage in setConnectionXml