Use the CPCNV utility to convert the text of a flat file, record by record, from a source code page to a destination code page. This utility supports record lengths up to 32k.
Note | You can port this utility to other platforms. |
CPCNVW32 /S /D /I /O /N /R
Use the CPCNV utility to convert text files written in one code page to another code page. The CPCNV utility loads either the FSISYS.INI or FAPCOMP.INI file to find these FMRES control group options:
< FMRes >
DefLib = ..\MSTRRES\FMRES\DEFLIB\ (default shown)
CodePage = CODEPAGE.INI (default shown)
This utility uses the CODEPAGE.INI file in your \mstrres\fmres\deflib directory. If the file is not there, the utility displays an error message. You can specify a different location by adding an INI option in the FSISYS.INI or FSIUSER.INI files, as shown here:
< FMRes >
DefLib =
Option |
Description |
DefLib |
Enter the path to the CODEPAGE.INI file. |
The CODEPAGE.INI file contains information about characters in various code pages. Here is an excerpt of the CODEPAGE.INI file:
< CodePages >
CodePage = 1004,W1
CodePage = 863,CF
CodePage = 850,PM
CodePage = 437,PC
CodePage = 37,Z1
< CodePage >
Char = SP010000, space, , 32, 32, 32, 32, 64
Char = SP020000, exclam, , 33, 33, 33, 33, 90
Char = SP040000, quotedbl, , 34, 34, 34, 34,127
(and so on)
Char = LA160000, Acircumflex, ,194,132,182, 0, 98
Char = LA150000, acircumflex, ,226,131,131,131, 66
(and so on)
The first control group, CodePages, lists the code pages specified by this file. The two character abbreviation, following the code page number, specifies an internal character set name used by some system font conversion utilities.
The second control group, CodePage, specifies character names and their associated code points in the different code pages listed in the first control group. The first column is the name of the character when printing to an AFP printer. The second column is the name of the character when printing to a PostScript printer. The third column is the name of the character when printing to a TrueType printer (not currently supported). The remaining columns correspond to the code points for the code pages specified in the first control group.
In the example above, there are five code pages specified: 1004, 863, 850, 437, and 37. Therefore, the last five columns represent code points for code pages 1004, 863, 850, 437, and 37 respectively.
For example, the first character defined (the space character) has these attributes:
Char = SP010000, space, , 32, 32, 32, 32, 64
AFP name = SP010000
PostScript name = space
TrueType name = (blank, not used)
1004 code point = 32
863 code point = 32
850 code point = 32
437 code point = 32
37 code point = 64
where as the A-circumflex (Â) character has the following attributes:
Char = LA160000, Acircumflex, ,194,132,182, 0, 98
AFP name = LA160000
PostScript name = Acircumflex
TrueType name = (blank, not used)
1004 code point = 194
863 code point = 132
850 code point = 182
437 code point = 0 (not defined for this code page)
37 code point = 98
Therefore, if you were to convert a text file built using code page 863 (Canadian French) to code page 1004 (ANSI/Documaker standard), any space characters would remain unchanged but any A-circumflex (Â) characters would change from a 132 to a 194 code point.
See the Fonts Reference for more information about fonts and code pages.
© Copyright 2013, Oracle and/or its affiliates. All rights reserved. Legal notices.