fix savexml's compatibility with wide character

avoid misjudgment in savexml when there are wide characters.