enable set encoding on the fly