Fix utf-8 encoding error when saving the file.