Add set encoding support