How to generate a code page file?