minor refactoring in SCB
refactoring EncodingState->EncodingStateRegistry