Arabic from HTML

General TRichView support forum. Please post your questions here
Post Reply
hmjehg
Posts: 2
Joined: Wed May 30, 2007 9:10 am
Location: Denmark
Contact:

Arabic from HTML

Post by hmjehg »

Hello

We're currently working on importing arabic HTML into a TRichView - subsequently RichViewEdit, but the text is not shown as arabic, even if the charset in the HTML specifies arabic.

I can see the the ActionTest program gives the same result, while opening the file in Internet Explorer gives the correct result.

We have tried different meassures after the office converter; among other things applying the charset to style.textstyles.charset.

We also have another problem when creating a TRichViewEdit: If we change the input language to arabic before creating the TRichViewEdit, the language bar shows arabic, but the input is not rendered in arabic. I have a feeling that these two problems may be interconnected due to the inherentance.

I would be happy to supply you any other information if required.

Best regards
Henrik M. Jehg
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

1. In order to support RTL languages, set RichViewEdit1.BiDiMode = rvbdRightToLeft or rvbdLeftToRight.

2. Probably, wrong charset is used. If you include rvoAutoSwitchLang in EditorOption, charset of the current text style will be switched according to the keyboard language when the user changes keyboard layout while TRichViewEdit has the input focus.
hmjehg
Posts: 2
Joined: Wed May 30, 2007 9:10 am
Location: Denmark
Contact:

Post by hmjehg »

Hello Sergey

1) We switched differently. Even if got a 'window-1256' in the HTML (and found the corresponding value in the IdCharset table) we changed the charset of the TRichView to the ARABIC_CHARSET value (which may match the 'ISO 8859-6' charset in HTML). This will work eventually, but shouldn't the office converter take care of that?

2) The problem is not while the control is in focus, this works fine with the rvoAutoSwitchLang - but the keyboard works 'per application', not per control (It may be a problem that the WM_INPUTLANGCHANGE is not sent to the parent windows from TRichViewEdit) - at least it is a problem that we don't send the message on to the TRichViewEdit if it is not in focus...

We could send a message to the control with the current input language when filling in the control with the original input, do you know the impact of such a message?
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

1) Converters generate RTF file which is loaded in TRichView. If charset is specified in RTF file, it will be used. But probably this converter does not specify the charset.

2) Yes, if you send WM_INPUTLANGCHANGE to RichViewEdit, it must do the work.
Post Reply