Character Map File Format
The character map file begins with the standard WP6.0 file header. The remainder of the file is
unique to the character map as defined below.
Size and Format | Meaning |
<0xFF> <0x57> <0x50> <0x43> | -1,"WPC". First four bytes of WP document file |
{Pointer to Data} | Long pointer to data area (absolute offset from the beginning of the file) |
<Product type> | WPCorp Product number. WordPerfect program = 1 |
<File type> | WPCorp file type. WP6.0 Character Map file = 49 |
<Major version> | Major version of file WP6.0 = 2 |
<Minor version> | Minor version of file WP6.0 = 0 |
[Encryption] | If non-zero, then document is encrypted |
[reserved] | Change label when used |
[Size of map information] | Begin of map information |
<Flag byte> | Bit 7 is set (0x80) for all 2-byte mappings. 2-byte conversions are done in code. There is no map name or map table saved in the map file. |
0x80 = Japanese mapping | |
0x81 = Korean mapping | |
0x82 = Chinese mapping | |
0x83 = Taiwanese mapping | |
[Pointer to map name] | Offset from start of map information |
[Pointer to convert table] | Table for converting document characters to WP characters |
[Map Name] x ? | Null terminated WP word string of indeterminate length |
[Minimum value] | Minimum value of mappable characters (greater than 0) |
[Maximum value] | Maximum value of mappable characters (less than or equal 127) |
[number of mappable chars] | Maximum - minimum + 1 |
[Size of table] | Total size of the map table |
[Char#, char set] | Document characters are mapped into the range 1-127. The 1-byte document character to WP character mapping table is essentially a lookup table. It consists of 127 entries, each one word in length. The first byte of the first word specifies the document character number and the second byte specifies the WP character set or lookup table in which the character is contained. The first character in the lookup table is mapped to document character number 1. The second character in the lookup table is mapped to character number two and so on. |
If the {Pointer to Data} field is greater than 16 bytes, then the header is an extended file header.
See File Header Format in the Introduction to Document File Formats.