During imports and stuff, it's imperative that all steps utilise the same encoding/character set. If a text file is not using the preferred encoding, we can use Vim to change it during its save action as follows:
:set fileencoding=utf8
:w
or if you want to save it to a different file and leave the current file unchanged:
:w ++enc=utf-8 newfile.txt
- Log in to post comments