PreviousNext
Help > Appendices > Common Problems > Using Language Conversion Tables
Using Language Conversion Tables

 In some countries (i.e., Israel), you would need to use translation table. This is the case when the AS/400 or the PC does not produce US/LATIN EBCDIC or ANSI characters. This will allow Delphi DataAware controls to work properly.

 

To use the conversion table, modify the “CODEPAGE FILE” in the alias configuration as follow:

CODEPAGEFILE …MyDirectory\MyPath\MyConversionTableName

 

Easycom For Delphi comes with a set of conversion tables. They all follow the naming convention:

 

Table name convention:

 EnnnAmmm.tbl

Where:

 nnn is the EBCDIC code page.

 mmm is Ascii code page. Ammm can be replaced by ANSI.

 

Ex: C:\ACE400\CodePage\e297ansi.cpg

 

 

The contain of a table is:

 Bytes 0 to 255   = EBCDIC to ASCII Conversion.

 Bytes 256 to 511   = ASCII to EBCDIC Conversion.

 

 

The value of the character will be used as an index in the table.

 

Example:

 To translate character '0':

 '0' = 0xF0 (240) in EBCDIC

 '0' = 0x30 (48) in ASCII

 Offset 240 of the file contains value 48.

 Offset 560 (512+48) contains value 240.

 

If the alias is modified in such a way that the translation may not generate an ANSI character set. So, the 'Langdriver' in the alias may have to be set properly, using Borland's tables (use BDE administrator). Langdriver is commonly set to “‘ascii’ ANSI”.

 

As an example, use the table ExxxAyyy.TBL. If your PC is using a Windows code page yyy and your AS/400 is using an EBCDIC code page xxx.

In such a case you will need to set the 'LangDriver' accordingly.