android - Currency symbol not formatting correctly in a textView? -


in app i have message can customised user , displayed in app.

if user enters "£100" shown "£100"?

i tried use font contains symbol didn't fix problem.

typeface font = typeface.createfromasset(getactivity().getassets(), "arial_unicode.ttf");  alerttextview.settypeface(font);  alerttextview.settext(message); 

i tried use *arial unicode ms, verdana, arial, code2000... problem persits.

any ideas?

use codes \u00a3 (lira) or try change encoding of string this:

byte[] mybytearray = message.getbytes(charsets.utf_8); string encodedmessage = new string(mybytearray, charsets.utf_8); alerttextview.settext(encodedmessage); 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -