Hello everyone,

Current Motif 2.1 layoutDirection behavior appears to be incorrect by
design. We would like to propose a change to rectify this problem.

Motif 2.1 reference documentation mentions that since Motif 2.0 the
layoutDirection property supercedes the stringDirection property such
that if stringDirection is not explicitly set during XmString creation,
the value defaults to the one that is active for the layoutDirection
property.
The layoutDirection property is particularly important to BiDirectional
locales for which Right-to-Left display of widgets is necessary.
According to the current behavior mentioned above, any BiDirectional
locale (such as Arabic or Hebrew) with a XmNlayoutDirection set to
XmRIGHT_TO_LEFT will by default result in reversing non-BiDirectional
strings as follows:

The sample of non-BiDirectional text (Latin1 text in this case) is
"Hello".
When a widget/gadget, such as a label, has a XmRIGHT_TO_LEFT setting
for XmNlayoutDirection, the sample Latin1 text appears as "olleH".

It is our opinion that such behavior is incorrect. The affected text
should never be reversed as this distorts any valid non-BiDirectional
text. Furthermore, this setting will also result in incorrect
BiDirectional text being displayed as the expected output of the
underlying PLS/Engine becomes distorted.

Such behavior should be avoided such that the stringDirection property
no longer inherits the value of layoutDirection in all
cases(BiDirectional or Non-BiDirectional text) . It is proposed that
the value should defaut to XmLEFT_TO_RIGHT instead. As a result, it
will have no immediate effect on the displayed text and any
BiDirectional or non-BiDirectional text will not be affected by default
and only valid readable text is displayed in widgets affected by the
layoutDirection property.

Thank you,
Tarek El Shaarani
Associate Software Engineer, AIX and Linux Team,
Globalization Department, Cairo Technology Development Center, IBM
Egypt.