add encoding for xml generation