April 26, 2014

[Solution] UTF-8 Gujarati Langauge Text Display Problem in Android

Gujarati Text (in UTF-8) in your JSON Response : ભારત - સર્વ શ્રેષ્ટ દેશ છે.

Steps to set it correctly in Android Textview:

  1. Copy Gujarati font in assest project directory
  2. Apply Gujarati font to textview, follow this steps.
  3. textView.setText(Html.fromHtml("YOUR UTF-8 Gujarati String HERE"));
This simple steps will display your all UTF-8 language text in android. Follow same steps for Punjabi, Tamil, Kannad, Bengali, Marathi language. 

Hope this helps!


Post a Comment