move code-page code to Initialize()