Page 1 of 1

Arabic in TRichViewEdit

Posted: Thu Feb 18, 2010 4:41 pm
by Pneumatis
Hi,

I would like to add formatted & arabic text in TRichViewEdit. I've got the text in a WideString var. When I use InsertTextW function or AddNLWTag function, I see ?????? . When user copy and paste the same arabic text in RichView control, the text is correct.

What can I do ?
Thanks

Sorry for my english, I'm french.

Posted: Thu Feb 18, 2010 5:55 pm
by Sergey Tkachenko
First, to support Arabic text, set RichViewEdit.BiDiMode=rvbdRightToLeft ot rvbdRightToLeft.

About '???'. This means that text passed to InsertTextW is converted from Unicode to ANSI.
You can use a text style with Charset=ARABIC_CHARSET, and this conversion will be correct.
But I recommend to use Unicode. For Delphi 3-2007, it requires some property changes. See: http://www.trichview.com/forums/viewtop ... t=70#11569

Posted: Mon Feb 22, 2010 11:04 am
by Pneumatis
Thanks very much ! I'm using ConvertToUnicode function, and now it works very well.