The .CP2 file format was written for the 16-bit DOS version of psftools, to avoid trying to fit all the codepages into memory at once. It's pretty simple. The first 128 bytes are the header. There are two versions: Version 1 (256 characters): 0x0000-0x0019: Magic number, "PSFTOOLS CODEPAGE MAP\r\n\032\000" 0x0040-0x0043: Number of long integers that follow the header (little-endian) All other bytes 0 (reserved) Version 2 (variable number of characters): 0x0000-0x001B: Magic number, "PSFTOOLS CODEPAGE MAP 2\r\n\032\000" 0x0040-0x0043: Number of long integers that follow the header (little-endian) 0x0044-0x0047: Number of character mappings in this file (little-endian) All other bytes 0 (reserved) The remainder of the file comprises 256 sequences (in v1) or the specified number of sequences (in v2) of little-endian long integers, each terminated with 0x0000FFFF, corresponding to the list of Unicode characters mapping to each code point. It's possible to generate .CP2 files from Unicode tables by using page2cp2: page2cp2 filename.txt filename.txt ... will import each text file as a codepage, and then dump it as a .CP2 file.