JDK-8201801 : RTL language (Hebrew) is presented from left to right
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 8u162
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • CPU: x86_64
  • Submitted: 2018-04-17
  • Updated: 2019-03-19
  • Resolved: 2018-09-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8u202 b01Fixed
Related Reports
Relates :  
Description
ADDITIONAL SYSTEM INFORMATION :
OSX Sierra, 1.8.0_171

A DESCRIPTION OF THE PROBLEM :
Right after upgrading to latest version my entire Swing app has become unreadable as it is using Hebrew text...

All letters are reversely presented, i.e. LTR although it is an RTL language with the correct orientation set. the behavior is such that a text like: �������������������� ���������������� appears as ���������������� ��������������������

REGRESSION : Last worked in version 8u162

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Simply use a swing app and display Hebrew text

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Text should correctly be displayed - RTL
ACTUAL -
Text will appear in a reversed manner

FREQUENCY : always



Comments
The issue is reproducible with Hebrew and Arabic languages. It appears that all RTL languages (AAT fonts) are affected. The observed behaviour is quite expected because RTL AAT is NOT supported by ICU. Quote from ICU guide: ������The AAT processing in the LayoutEngine is relatively basic as it only applies the default features in left-to-right text. This processing has been tested for Devanagari text. Since AAT processing is not script-specific, it might not work for other scripts������, for more details refer to http://userguide.icu-project.org/layoutengine Possible fix is to ignore ���layout tables��� for AAT fonts if layout is RTL.
31-08-2018

The problem is reproducible on JDK 9 and 10 if test case is executed with the following option: -Dsun.font.layoutengine=icu Most likely this is ICU issue.
24-05-2018

The problem was triggered by back port of JDK-7162125 to JDK8u. An interesting thing is that the problem is not reproducible on JDK9, 10, 11 which also has the fix for JDK-7162125
24-05-2018

As per description RTL language (Hebrew) is not presented correctly when used in input in text field in a swing application. The issue is reported with JDK 8u171 and MAC OS X. Checked this for reported OS as well as JDK version and could confirm the issue as reported. The input appears in reverse order (Left to Rght, instead of Right to Left). Results: =========== 8u152: OK 8u161: OK 8u162: Fail 8u172: Fail 9.0.4: OK 11 ea b09: OK This is a regresison in JDK 8u162 and is restricted to MAC OS X (checked with 10.13.1) as it works fine in Windows (checked with Windows 10 b1709). To verify, compile and run the attached test case with respective JDK version. Switch to Hebrew (Israel) language. Start typing the characters A to Z from keyboard. Observe that in case of JDK 8u16 and plus the input appears in reverse order contrary to default Right to Left in case of Hebrew language.
18-04-2018