add encoding setting.