refactoring wrt encoding compatibility