Fix encoding of names when saving.