EGL Reference Guide for iSeries

Bidirectional language text

Bidirectional (bidi) languages such as Arabic and Hebrew are languages in which the text is presented to the user ordered from right to left, but numbers and Latin alphabetic strings within the text are presented left to right. In addition, the order in which characters appear within program variables can vary. In COBOL environments, the text in program variables is usually in visual order, which is the same order in which the text appears on the user interface. In Java environments, the text is usually stored in logical order, the order in which the characters are entered in the input field.

These differences in ordering and in other associated presentation characteristics require the program to have the ability to convert bi-directional text strings from one format to another. The bidi conversion attributes are specified in a bidi conversion table (.bct) file created separately from the program. The program references the name of the conversion table to indicate how attribute conversion should be performed.

In all cases, the bidi conversion table reference is specified as the 1 to 8 character file name without the .bct extension. For example, if you have created a bidi conversion table named mybct.bct, you can set the value of formConversionTable in a program by adding the following statement at the beginning of the program:

  sysVar.formConversionTable = "mybct.bct" ;

Your tasks are as follows:

You build the bidi conversion table file using the bidi conversion table wizard plugin, which is in the file BidiConversionTable.zip:

  1. Download the file from the following web site:
     
    
  2. Unzip the file into your workbench directory
  3. To begin running the wizard, click File > New > Other > BidiConversionTable.

    The name of a table used with EGL programs must have eight characters or less and must have the .bct extension.

  4. While running the wizard, press F1 for help in choosing the correct options for creating the table.

When creating a bidi conversion table for generating COBOL programs, specify the client encoding and server encoding as shown in the next table.


Language Client encoding for bidi conversion table Server encoding for bidi conversion table
Arabic Cp1256 Cp864
Hebrew Cp1255 Cp1255

The bidi conversion table controls the transformation of the text from logical to visual order for the COBOL environment, along with any other formatting transformation requested in the table. At program-generation time, a pair of build descriptor options (clientCodeSet and serverCodeSet) control the conversion of the code page from ASCII to EBCDIC, as shown in the next table.


Language clientCodeSet serverCodeSet
Arabic IBM-864 IBM-420
Hebrew IBM-1255 IBM-424

Related reference
bidiConversionTable
clientCodeSet
Data conversion
serverCodeSet
sysVar.callConversionTable


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]