Allow encoding to be set when creating corpus for import