开发者

How to display Gujarati text from database

I am using a SQLite database which is in Gujarati language. When I show data from this database in my app, it appears as some garbage characters (some boxes or rectangles). I am using the following code to set the Gujarati font in my app;

Typefa开发者_运维知识库ce typeface = Typeface.createFromAsset(getAssets(),"FontName.ttf");

buttonsetTypeface(typeface);
button.setText(StringEscapeUtils.unescapeXml(a[i]).trim());

What do I have to do so that the text appears properly in Gujarati?


Maybe your android phone has to be setup to support the language. Apparently the language code is 'gu' if that helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜