Greetings Sergey,
Here is a possible bug a co-worker found in regards to Hebrew and English mixed.
The letters are in correct order. However, the Hebrew word order gets changed around when loading into RVF.
The Hebrew words are in red. Please see the attached .rtf and .pdf
Possible Hebrew RTL word order bug
Possible Hebrew RTL word order bug
- Attachments
-
- HebrewTest.pdf
- (93.38 KiB) Downloaded 1235 times
-
- HebrewTest.rtf
- (886 Bytes) Downloaded 1320 times
Re: Possible Hebrew RTL word order bug
I just wanted to clarify with a screenshot. Top is the file in Wordpad, and showing the correct word order of the two words.
Thanks, Jon.
Thanks, Jon.
-
- Site Admin
- Posts: 17521
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Possible Hebrew RTL word order bug
I modified the code to improve arrangement of items in bi-directional text:
Since the main text direction in your document is LTR, assign RichViewEdit.BiDiMode = rvbdLeftToRight.
Do it before loading RTF (because text and paragraph direction properties are not read from RTF if RichViewEdit.BiDiMode = rvbdUnspecified).
If you are a registered TRichView user, I can send a changed unit for you for testing. If not, please wait for the next TRichView update.
Please note that the code that arranges items is activated only if you assign RichViewEdit.BiDiMode = rvbdLeftToRight or rvbdRightToLeft.
Since the main text direction in your document is LTR, assign RichViewEdit.BiDiMode = rvbdLeftToRight.
Do it before loading RTF (because text and paragraph direction properties are not read from RTF if RichViewEdit.BiDiMode = rvbdUnspecified).
If you are a registered TRichView user, I can send a changed unit for you for testing. If not, please wait for the next TRichView update.
Re: Possible Hebrew RTL word order bug
Thank, I will check. I May have accidentally turned that off in fixing something else. Appreciate it Sergey!
-
- Site Admin
- Posts: 17521
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Possible Hebrew RTL word order bug
RichViewEdit.BiDiMode = rvbdUnspecified by default, so you need to assign rvbdLeftToRight explicitly.
Unfortunately, in the current version, it does not help in this document. The problem is in the space character between these two Hebrew words. This character is a separate item not marked as RTL text, so TRichView treats it as LTR text, and arranges text as on your screenshot.
I made corrections to take surrounding text into account, so it will work better in the next update.
In the current version, minor modification of this document can help:
- You can delete this space character between Hebrew words and type a new space character. The words will be combined in a single item which must be displayed correctly.
- Or you can select it and apply RTL direction. In RichViewActions, you can use TrvActionTextRTL (RichViewActions include bi-di actions: TrvActionTextRTL, TrvActionTextLTR, TrvActionParaRTL, TrvActionParaLTR, but in ActionTest demos they are not assigned to menu items or toolbar buttons).
Unfortunately, in the current version, it does not help in this document. The problem is in the space character between these two Hebrew words. This character is a separate item not marked as RTL text, so TRichView treats it as LTR text, and arranges text as on your screenshot.
I made corrections to take surrounding text into account, so it will work better in the next update.
In the current version, minor modification of this document can help:
- You can delete this space character between Hebrew words and type a new space character. The words will be combined in a single item which must be displayed correctly.
- Or you can select it and apply RTL direction. In RichViewActions, you can use TrvActionTextRTL (RichViewActions include bi-di actions: TrvActionTextRTL, TrvActionTextLTR, TrvActionParaRTL, TrvActionParaLTR, but in ActionTest demos they are not assigned to menu items or toolbar buttons).
Re: Possible Hebrew RTL word order bug
Greetings Sergey,
For me changing that to LTR seems to have fixed it.
For me changing that to LTR seems to have fixed it.