be less strict on state.encoding check
1.1.2