add encoding info to file