![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, I have a stupid qustion, but I am not able to find the correct way of specifying an format-string which contains Right-to-Left strings... Here is the string: In english it should look like: "Param1: {0}, Param2: {1}" In hebrew it should look like: "{1} :1maraP ,{0} :2maraP" (of course ":1maraP" and ":2maraP" is hebrew!) The first-Problem is, that I am not able to insert this string in an textbox... It always produces the following (or at least, it displays it): "1} :2maraP ,{0} :1maraP}" Ok, I managed to get this to work with a bad trick (just for example): code string hebrew = string.Empty; hebrew += (char) 0x05D3; hebrew += (char) 0x05E7; hebrew += (char) 0x05D4; this.textBox1.Text = "{1} :" + hebrew + " ,{0} :" + hebrew; /code My second problem is now, that this only displays the correct stuff if it contains numbers!!! If it contains english (or LTR characters) it produces nonsence!!!: With numbers (11111, and 22222): "22222 :2maraP ,11111 :1maraP" If I use RTL-Text with numbers ("111sdfsdf sdf11" and 22222) it produces (displays): "22222 :111, 2maraPsdfsdf sdf11 :1maraP" What I want is: "22222 :2maraP ,111sdfsdf sdf11 :1maraP" code this.textBox2.Text = string.Format(this.textBox4.Text, 11111, 22222); this.textBox3.Text = string.Format(this.textBox4.Text, "111sdfsdf sdf11", 22222); /code How can this be accomplished! Are there any markers, which can be used to represent an string-block? I also want the string to be correct displayed if the parameter contains mixed RTL and LTR-Text... Any hints? -- Greetings Jochen My blog about Win32 and .NET http://blog.kalmbachnet.de/ |
#3
| |||
| |||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |