change encoding attachment