Set source/output encoding