Question

I had been used FontFamily="Bamini Plain" in the text box which was allowing me to type the tamil language text during runtime. But when I capture txtPlaceAcquire.Text in the code behind which returns english text. Why this strange behaviour? how can I get my original language value?

<TextBox Text="" Name="txtPlaceAcquire"  Width="210" Margin="10,0" FontFamily="Bamini Plain" />  <!-- Tamil language font setup -->

var textCapuredVal =  txtPlaceAcquire.Text;  // It was given english value
Était-ce utile?

La solution

Being a Tamil and had dealt with so much of Tamil encodings I think I should enlighten you on this issue. Bamini is doesn't belong to any encodings such as TAB, TAM, TSCII or the universal standard Unicode. Bamini font is having Tamil scripts on top of English script.

So I would suggest you to start using Unicode font. There are amble of Tamil fonts available online. Even windows comes with a default Unicode Tamil font latha.ttf.

To type in Tamil use softwares like e-kalappai or NHM writer. Or you can use online converters such as Google IME.

I'd suggest you to give up Bamini and go ahead with Unicode fonts. If you insist on usinb Bamini then you should do code level encoding changes between Bamini and Unicode. Check out this class written in Java and see how it is done. You gonna have to do soemthing like this.

Autres conseils

This works for me with no problem, and it returns unicode text for me, I put it in a answer, as I cannot add images in the comment. See below image.

enter image description here

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top