Enabling bidirectional text layout transformations for DB2 Type 4 UDB JDBC driver

Enabling bidirectional (BiDi) text layout transformations allows the driver to correctly handle the data entered in a language with the right-to-left writing system when retrieving it from the database.

About this task

To enable BiDi text layout transformations for a data source, complete the following steps:

Procedure

  1. In the Repository Explorer view, right-click the data source that you want to work with and select Properties from the menu.
  2. In the upper-left corner of the Properties window, click Connection Parameters.
  3. In the Connection Parameters area, click Advanced.
  4. Enable the following properties: enableBidiLayoutTransformation, serverBidiStringType, and clientBidiStringType.
  5. Set the value of the enableBidiLayoutTransformation property to true.
  6. For the serverBidiStringType and clientBidiStringType properties, select integer values that match the way the data is stored on the server machine and represented on the client machine that you work with. Use the following table as a reference.Use the following table as a reference:
    Table 1. Property values and corresponding attributes for the serverBidiStringType and clientBidiStringType properties
    Value Type of text Text Orientation Symmetric swapping Numeral shape Text shapes
    4 Visual Left-to-right No Nominal Shaped
    5 Logical Left-to-right Yes Nominal Nominal
    6 Logical Right-to-left Yes Nominal Nominal
    7 Visual Right-to-left No Nominal Shaped
    8 Visual Right-to-left No Nominal Shaped
    9 Logical Right-to-left Yes Nominal Shaped
    10 Logical Contextual left-to-right Yes Nominal Nominal
    11 Logical Contextual right-to-left Yes Nominal Nominal
    Consider the following descriptions of the attributes listed in Table 1:
    Type of text
    Specifies the relationship between the order of text as stored in memory or on external media and its order for correct display. Possible values are:
    • Visual – text is stored in the same order as it is displayed
    • Logical – text is stored in the order it is intended to be read
    Text orientation
    Specifies the direction in which the text is stored. Possible values are:
    • Left-to-right – marks the text as left-to-right
    • Right-to-left – marks the text as right-to-left
    • Contextual left-to-right – the direction of the text is determined by analyzing the text itself. If the first strong character belongs to the left-to-right script or there are no strong characters in the text, it is marked as left-to-right. If the first strong character belongs to a right-to-left script, the text is marked as right-to-left.
    • Contextual right-to-left – the direction of the text is determined by analyzing the text itself. If the first strong character belongs to the left-to-right script, the text is marked as left-to-right. If the first strong character belongs to a right-to-left script or there are no strong characters in the text, it is marked as right-to-left.
    Symmetric swapping
    Specifies whether characters that have an implied directional meaning, such as <, >, (, ), and so on, are replaced with their mirror images. This option is meant for texts that are written in right-to-left writing systems and are stored in Visual order. Symmetric swapping is not performed for texts that are stored in logical order. Possible values are:
    • Yes – symmetric swapping is enabled
    • No – symmetric swapping is disabled
    Numeral shape
    Specifies whether numbers are presented by using the European digit shapes or the Arabic-Indic digit shapes. Possible values are:
    • Nominal – numbers are presented by using the European digit shapes
    • National – numbers are presented by using the Arabic-Indic digit shapes
    Text shapes
    Specifies the encoding for Arabic symbols. Possible values are:
    • Nominal – Arabic letters are encoded with intrinsic code points, in the "06xx" range for Unicode
    • Shaped – Arabic letters are encoded as presentation forms which can be Initial, Middle, Final, or Isolated