Added unit tests and use code page number.