Code page location search order

ITP/Server will search for code page translation tables in the following order:

  1. Using a custom code page mapping file.
  2. Using the code page translation tables provided by Microsoft Windows.
  3. Using built-in code page tables.

If ITP/Server is unable to locate the appropriate code page translation tables the conversion will fail.

The following code pages are built into ITP/Server:

273

Germany EBCDIC

 

912

Latin 2 ISO 8859-2

277

Danmark/Norway EBCDIC

 

915

Cyrilic ISO 8859-5

278

Finland/Sweden EBCDIC

 

921

Baltic - ISO

280

Italian EBCDIC

 

922

Estonia

284

Spanish EBCDIC

 

930

Japan EBCDIC

285

UK EBCDIC

 

942

Japan SAA (1041+301)

290

Japanese EBCDIC

 

943

Japan JIS-90 (1041+941)

297

French EBCDIC

 

1004

Windows

420

Arabic Bilingual

 

1025

Cyrilic EBCDIC

424

Israel EBCDIC

 

1026

Turkey ISO 8859-9

437

US

 

1027

Japanese Latin EBCDIC

500

International EBCDIC

 

1112

Baltic EBCDIC

813

Greece ISO 8859-7

 

1122

Estonia EBCDIC

819

Latin 1 ISO 8859-1

 

1140

Portugal/US EBCDIC with Euro

850

Multilingual

 

1141

Germany EBCDIC with Euro

852

Latin 2

 

1142

Danmark/Norway EBCDIC with Euro

855

Cyrilic

 

1143

Finland/Sweden EBCDIC with Euro

857

Latin 5

 

1144

Italian EBCDIC with Euro

860

Portugal

 

1145

Spanish EBCDIC with Euro

861

Iceland

 

1146

UK EBCDIC with Euro

862

Israel

 

1147

French EBCDIC with Euro

863

Canada (French)

 

1148

International EBCDIC with Euro

864

Arabic

 

1149

Iceland with Euro

865

North European

 

1250

Latin 2 Windows

866

Russia

 

1251

Cyrilic Windows

869

Greece

 

1252

Latin 1 Windows

870

Latin 2 EBCDIC

 

1254

Turkey Windows

871

Iceland

 

1257

Baltic Windows

874

Thailand

 

1275

Apple Latin 1

878

Russia Internet

 

 

 

897

Japan

 

 

 

The parameter SubstituteChar provides a default character that will be used if a character from the Src file could not be mapped to the Dest. If the parameter SubstituteChar contains more than one character only the first character will be used.

If the parameter SubstituteChar is not present or if it contains an empty string the value of the parameter SubstituteCode will be used as the numeric representation of the replacement character.

Note

The parameter SubstituteChar will be ignored if built-in translation tables are used for the conversion. In this case a space will be used as substitution character.

If the parameter To maps to the code page "unicode" or "unicode-big-endian" the parameter SubstituteCode can also be used to specify Unicode characters as replacement. If the parameter To maps to a single-byte code page only the lowest byte of the parameter SubstituteCode is used.

Example

Value

Description

Example

ddd

Any character code ddd in decimal format.

"8364" maps to the Euro symbol € in the Unicode codepages.

0xhhh

Any character code hhh in hexadecimal format.

"0x20ac" maps to the Euro symbol € in the Unicode codepages.

A SubstituteCode value of 0 is ignored.

Note

If neither the parameters SubstituteChar nor SubstituteCode provide a valid replacement character the command ConvertCodepage will report an error if the conversion encountered an character that could not be mapped.

Codepage mapping files

The user can provide custom codepage mapping files, which should provide a mapping from a specific single-byte code page to Unicode.

These files should be named CP-nnn.cpt (where nnn is the decimal number of the code page). The file should contain a set of mappings in the form:

<Single byte code>: <Unicode equivalent>

Each mapping should be on its own line. Comments can be added using the hash (#) mark.

The codes can be specified in decimal notation (default) or hexadecimal notation (prefixed with '0x').

Example

# Sample codepage translation table, using hexadecimal encoding
# Format: <single-byte>: <unicode> # <comment>
0x00: 0x0000 # Map NUL to NUL
# ... more lines here.
0x20: 0x0020 # SPACE
0x21: 0x0021 # !
0x22: 0x0022 # "
0x23: 0x0023 # #
0x24: 0x0024 # $
0x25: 0x0025 # %
0x26: 0x0026 # &
0x27: 0x0027 # '
0x28: 0x0028 # (
# ... Yet more lines.

Single byte characters that are not specified in this file are considered un-map able and will cause a translation error if ITP/Server encounters them.

Note

ITP/Server will look for the code page mapping files in the bin directory of ITP/Server. An alternative location can be configured by adding the setting CodepageDir=<location> to the [Configuration] section of the dp.ini file.