Set encoding of file.