Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

newline for Arabic or urdu string

        string s = "";

        s += "پاکستان کے وزیراعظم نواز شریف نے یقین دہانی کرائی ہے کہ صحافی حامد میر پر قاتلانہ حملے :TV";

        s += "\n\r"+"بی بی سی اردو کا آفیشل ٹوئٹر اکاؤنٹ۔:BBC Urdu's";

        xrLabel1.Text = s;

but its show worried output like

 پاکستان کے وزیراعظم نواز شریف نے یقین دہانی کرائی ہے کہ صحافی حامد میر پر قاتلانہ حملے :GEOبی بی سی اردو کا آفیشل
ٹوئٹر اکاؤنٹ۔:BBC Urdu's

i want some thing like (same like my code)

پاکستان کے وزیراعظم نواز شریف نے یقین دہانی کرائی ہے کہ صحافی حامد میر پر قاتلانہ حملے :GEO
بی بی سی اردو کا آفیشل ٹوئٹر اکاؤنٹ۔:BBC Urdu's

i think its new line problem any suggestion or solution's ?

like image 605
sms247 Avatar asked Nov 15 '25 12:11

sms247


2 Answers

You actually need a right to left embedding character (RLE) at the beginning of the line to show RTL and LTR words correctly.

  • U+202A:   LEFT-TO-RIGHT EMBEDDING (LRE)
  • U+202B:   RIGHT-TO-LEFT EMBEDDING (RLE)
  • U+202D:   LEFT-TO-RIGHT OVERRIDE (LRO)
  • U+202E:   RIGHT-TO-LEFT OVERRIDE (RLO)
  • U+202C:   POP DIRECTIONAL FORMATTING (PDF)

http://www.w3.org/International/questions/qa-bidi-controls

char rleChar = (char)0x202B;// RLE embedding 
text = rleChar + text;
like image 145
VahidN Avatar answered Nov 18 '25 15:11

VahidN


You can try using Environment.NewLine and see if that helps.

However I think that the problem is the label, try changing the Text Wrap or other properties related to rows and also to AutoSize.

If that fails use 2 labels.

like image 29
Alexandru Lache Avatar answered Nov 18 '25 15:11

Alexandru Lache



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!