Fix source & output encodings