Hebrew Display issues

General TRichView support forum. Please post your questions here
Post Reply
jgkoehn
Posts: 303
Joined: Thu Feb 20, 2020 9:32 pm

Hebrew Display issues

Post 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 16410 times
Good Hebrew
GoodHebrew.png
GoodHebrew.png (17.17 KiB) Viewed 16410 times
Any thoughts ideas? I am using TRichView 18.3.1
Attachments
Problem Hebrew.rtf
(45.14 KiB) Downloaded 1189 times
Good Hebrew.rtf
(44.67 KiB) Downloaded 1299 times
JG
Posts: 11
Joined: Tue Nov 30, 2010 11:48 am

Re: Hebrew Display issues

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Hebrew Display issues

Post 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).
JG
Posts: 11
Joined: Tue Nov 30, 2010 11:48 am

Re: Hebrew Display issues

Post 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.
Post Reply