Page 1 of 1

Hebrew Display issues

Posted: Wed May 06, 2020 7:29 pm
by jgkoehn
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
ProblemHebrew.png
ProblemHebrew.png (17.7 KiB) Viewed 16236 times
Good Hebrew
GoodHebrew.png
GoodHebrew.png (17.17 KiB) Viewed 16236 times
Any thoughts ideas? I am using TRichView 18.3.1

Re: Hebrew Display issues

Posted: Wed May 06, 2020 8:58 pm
by JG
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.

Re: Hebrew Display issues

Posted: Sun May 10, 2020 9:39 am
by Sergey Tkachenko
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).

Re: Hebrew Display issues

Posted: Sun May 10, 2020 5:50 pm
by JG
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.