fixed encoding issues in sword