Only set encoding when necessary