Greetings Sergey,
We are having some additional problems with Right to Left Hebrew.
Here are two rtfs with Hebrew. One displays correctly, one does not both are exported from Ms Word.
(Jon Graef said changing styles seems to affect things in MS Word)
Problem Hebrew
Good Hebrew
Any thoughts ideas? I am using TRichView 18.3.1
Hebrew Display issues
Hebrew Display issues
- Attachments
-
- Problem Hebrew.rtf
- (45.14 KiB) Downloaded 1171 times
-
- Good Hebrew.rtf
- (44.67 KiB) Downloaded 1272 times
Re: Hebrew Display issues
Sergey, just to add to this. Both files render correctly in WordPad and LibreOffice, so it is not something wrong with the data, it is just something that has not been accounted for. Hopefully with such a simple example you will see what the difference is and be able to get a fix and our confidence will return in using your program for Hebrew.
Appreciate your work.
Jon Graef
theWord Bible Software.
Appreciate your work.
Jon Graef
theWord Bible Software.
-
- Site Admin
- Posts: 17521
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Hebrew Display issues
In the Good file, all Hebrew characters are written with the same font ("Cardo (Hebrew)" (converted by RV to "Cardo"), HEBREW_CHARSET).
In the Problem file, almost all Hebrew characters are written with this font, except for ֙ character, that is written using ("Cardo", ANSI_CHARSET). This character breaks the string in TRichView.
There is a workaround, ignoring all Charsets in RTF and use a predefined Charset instead. Charsets are not very important for Unicode text, so it is a safe option.
Assign RichViewEdit.RTFReadProperties.UseCharsetForUnicode := True.
I recommend to leave RichViewEdit.RTFReadProperties.CharsetForUnicode = DEFAULT_CHARSET.
(In the new version of TRichView, these 2 properties are applied to all text read from Unicode, because all text is stored in TRichView as Unicode).
In the Problem file, almost all Hebrew characters are written with this font, except for ֙ character, that is written using ("Cardo", ANSI_CHARSET). This character breaks the string in TRichView.
There is a workaround, ignoring all Charsets in RTF and use a predefined Charset instead. Charsets are not very important for Unicode text, so it is a safe option.
Assign RichViewEdit.RTFReadProperties.UseCharsetForUnicode := True.
I recommend to leave RichViewEdit.RTFReadProperties.CharsetForUnicode = DEFAULT_CHARSET.
(In the new version of TRichView, these 2 properties are applied to all text read from Unicode, because all text is stored in TRichView as Unicode).
Re: Hebrew Display issues
Sergey, thank you so much for this fix. We really appreciate you fixing this so quickly. We had been trying to chase this issue down for some time. Now our confidence is restored when rendering Hebrew.
Jon
theWord Bible software team member.
Jon
theWord Bible software team member.