fix encoding setting