Click here to Skip to main content
11,412,125 members (65,241 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C# RichTextBox rtl
Hello, Guys!

I'm developing a multi-language text editor with RTL scripting support.
I have a problem with Thaana scripting Dhivehi (Maldivian) language.

When I read or paste some Maldivian text to the RichTextBox control
I have the same text but with wrong letters order.

This problem is present only for Thaana scripting and only in the RichTextBox control.

I tried to use MPH 2B Damase and TITUS Cyberbit Basic fonts, but the result is the same.
All other RTL langs (Arabic, Hebrew, Urdu) look properly.

I have already tried:

textBox1.LanguageOption = RichTextBoxLanguageOptions.DualFont; // and others

this.RightToLeft = RightToLeft.Yes; // this = Form1 with RichTextBox
this.RightToLeftLayout = true;
this.textBox1.RightToLeft = RightToLeft.Yes;

But RichTextBox does not draw Thaana texts properly. It draws it in same letters order as LTR script languages. But Hebrew and Arabic look properly with same fonts!

Thanks for any suggestions.
Posted 27-Jan-13 1:00am
Edited 27-Jan-13 5:28am
Bernhard Hiller at 6-May-13 3:37am
When does the problem occur? When you do a Copy&Paste from other sources (which ones?) only? Or when you type with your keyboard? Or when you set the text via rtb.Text="މައި_ޞަފްޙާ"? Or something else?

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

how you write Urdu in richtextbox
show the code

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 348
1 Sergey Alexandrovich Kryukov 225
2 Sascha Lefévre 150
3 ProgramFOX 130
4 Maciej Los 110
0 Sergey Alexandrovich Kryukov 8,955
1 OriginalGriff 7,158
2 Maciej Los 3,480
3 Abhinav S 3,248
4 Peter Leow 3,059

Advertise | Privacy | Mobile
Web03 | 2.8.150414.5 | Last Updated 5 May 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100