The command ConvertCodepage will copy a file and perform a code page conversion during this copy.
ConvertCodepage
Src(<text>)
Dest(<text>)
From(<text>)
To(<text>)
SubstituteChar(<text>)
SubstituteCode(<number>)
TimeOut(<number>);
Src: Required.
The file, which content has to be converted.
Dest: Required.
The destination of the converted file.
From: Required.
Codepage in which the file Src is stored. See the section Remarks for special values.
To: Required.
Codepage to which the file Dest has to be converted. See the Remarks below for special values.
SubstituteChar: Optional.
Replacement character that will be used if a character from the file Src could not be translated into the under To mentioned code page.
SubstituteCode: Optional.
Numerical representation for the replacement character that will be used if a character from Src could not be translated into the code page To.
TimeOut: Optional.
The maximum amount of time in seconds the ConvertCodepage command will wait for the client to reports its code page if the 'client' code page is specified as From or To parameter. If this time is exceeded the upload is aborted and an error is reported.
If this parameter is omitted ITP/Server will use the default time out interval as configured in the ITP/Server Administrator. If this parameter is set to 0 the query will not time out.
The parameters To and From specify the source and target code pages. These code pages can be one of the following values:
Value |
Description |
Source of translation table |
|---|---|---|
"0" |
Use the local Windows code page. |
Uses Windows code page translation system. |
"nnn" |
Any number nnn: the number of the code page. |
See below. |
"client" |
Query the remote client for its code page. |
Client can either provide a full translation table or a code page number. If the client provides only the code page number, the table is located as described below. |
"local" |
Use the local Windows code page. |
Uses Windows code page translation system. |
"unicode" |
Use Unicode (UTF-16 encoding, see note below) in Intel 386 byte order (little endian). |
|
"unicode-big-endian" |
Use Unicode (UTF-16 encoding, see note below) in big endian byte order. |
|
"windows" |
Use the local Windows code page. |
Uses Windows code page translation system. |
Note
If both To and From specify the same code page, ITP/Server will copy the Src file to Dest as if the command CopyFile had been specified.
Note
The code pages "0", "local" and "windows" all perform the same translation using the local Windows code page. These aliases are provided for backward compatibility.
Note
The command ConvertCodepage only supports translations for code pages which use a fixed-length character encoding. Code pages which use a variable-length encoding (such as MBCS SI/SO sequences or UTF-8) are currently not supported.
The codepage translations "unicode" and "unicode-big-endian" are limited to the UCS‑2 subset of UTF-16 (characters U+0000 .. U+FFFF). Characters in the supplementary planes are considered unmappable and replaced with the replacement character.
If the ConvertCodepage command is terminated due to a time out the connection to the ITP/Server process will be reset to ensure that data in transit is discarded and processes resynchronize correctly. This forced reset can result in additional network-related errors in the log for this job. Any further communication from this job between the Document Processor and the client will fail. The client will be informed that the Document Processor disconnected.