cpheader
Adds and removes data code page header information to and from exported workspace items (queries, charts, reports, report formats) and form files created by using the original HCL Compass Designer.
Synopsis
- cqperl cpheader.pl -a [ file-path | [ directory-path { regular-expression } ] ] code-page
- cqperl cpheader.pl -s [ file-path | [ directory-path { regular-expression } ] ]
The cpheader command is located in the HCL Compass installation directory.
Description
HCL Compass adds header information to exported workspace items and to form files created by using the original HCL Compass Designer. The header contains information about the data code page of the HCL Compass database that the files are exported from. The header ensures that the exported files are imported correctly into other HCL Compass databases that might use a different code page.
The exported workspace items and form files do not have a code page header.
Use the cpheader command to migrate the workspace items and form files created by using the original HCL Compass Designer into a HCL Compass database with a UTF-8 (8-bit Unicode Transformation Format) code page. By using this command, you prevent importing workspace items and form files into a HCL Compass database that does not match the code page of the exported files and thus prevent data corruption. UTF-8 supports characters from all code pages, so you can import all code pages into a database that supports the UTF-8 code page.
Options and arguments
- -a
- Add the data code page header to the specified file or files in the specified directory and its subdirectories.
- -s
- Remove the data code page header from the specified file or files in the specified directory and its subdirectories.
- file-path
- Path specification of the file to which to add or remove the code page header.
- directory-path { regular-expression }
- Path specification of the directory containing the files to which to add or remove the code page header. If you specify a regular-expression, then the code page header is added to or removed from only the files in the directory and its subdirectories with a name that matches the regular-expression. If you do not specify a regular expression, then the code page header is added to or removed from all the files in the directory and its subdirectories.
- code-page
- HCL Compass data code page.
Use cases
Examples
- Add the header for the Western European data code page 1252 to
the file
c:/all_defects.qry
:cqperl cpheader.pl -a c:/all_defects.qry 1252
- Add the header for the Simplified Chinese data code page 936 to
all files in the directory
c:/queries
and its subdirectories:cqperl cpheader.pl -a c:/queries 936
- Add the header for the Simplified Chinese data code page 936 to
all files in the directory
c:/queries
and its subdirectories matched by the expression.cfg$
:cqperl cpheader.pl -a c:/queries .cfg$ 936
- Remove the code page header from the file
c:/alldefect.qry
:cqperl cpheader.pl -s c:/alldefect.qry
- Remove the code page header from all files in the directory
c:/qrydir
and its subdirectories:cqperl cpheader.pl -s c:/qrydir