fixed reset of charset encoding