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
- In the Repository Explorer view, right-click the data source that you want to work with and select Properties from the menu.
- In the upper-left corner of the Properties window, click Connection Parameters.
- In the Connection Parameters area, click Advanced.
-
Enable the following properties:
enableBidiLayoutTransformation
,serverBidiStringType
, andclientBidiStringType
. -
Set the value of the
enableBidiLayoutTransformation
property totrue
. -
For the
serverBidiStringType
andclientBidiStringType
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 displayedLogical
– 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-rightRight-to-left
– marks the text as right-to-leftContextual 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 enabledNo
– 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 shapesNational
– 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 UnicodeShaped
– Arabic letters are encoded as presentation forms which can beInitial
,Middle
,Final
, orIsolated