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 ?

有帮助吗?

解决方案

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;

其他提示

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.

i used unicode(U+000A and U+000D) character for \n and use RLE(U+202B) for each line now its work fine for me here is the detail of Unicode you urdu and Arabic
Finish typing the Arabic word and add a space after it (this space separates the embedded text from the Arabic text to its right). Insert special character U+000A (to Feed Newline an Arabic character). Insert special character U+000D (to Feed RETURN/ENTER an Arabic character). Insert special character U+200F (to render the preceding space an Arabic character). Insert special character U+202A (to begin the left-to-right embedding). Insert special character U+202B (to begin the Right-to-LEFT embedding). Insert another space (to separate the embedded text from the Arabic text that will continue to its left). Change the keyboard to e.g. English and type the left-to-right word. Insert special character U+202C (to restore the bidrectional state to what it was before the left-to-right embedding). Change the keyboard back and continue writing in Arabic.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top