Error importing from vanilla: invalid byte sequence in UTF-8

A post was split to a new topic: How to edit an import script on the production server?