[SOLVED] How to display 5 digit unicode characters such as a speaker /u1f50a


The speaker icon unicode 1f50a is 5 digits from the “Miscellaneous Symbols and Pictographs” family and when I try and display it I get ” a” so apparently I am getting 1f50 (which doesn’t exist so blank) followed by “a”. I can display any 4 digit unicode character but can’t find how to display the longer ones. I know the tablet can display it as I can see it in the Unicode Map app.

        textSound = (TextView)findViewById(R.id.textSound);


These characters cannot be represented directly in a Java string since it uses only 16 bits per character. But there is an escaping mechanism called “surrogate pairs”. The character number 1f50a for example can be represented by the two 16 bit ‘characters’ D83D and DD0A. So something like “\uD83D\uDD0A” might work (I did not try it). It still depends if this character is available in the used font.

This site can help with the conversion.

Answered By – Henry

Answer Checked By – Marie Seifert (BugsFixing Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *