My string.xml
is utf-8.
<string name="id">Hi \u0026</string>
^This worked. and showed as: Hi &.
But this does not work with this emoji 👈:
<string name="id">Hi \u1F448</string>
https://www.compart.com/en/unicode/U+1F448
How can I make it work with 👈?
Use HTML Entity (decimal) ie 👈
to add 👈 in strings.xml
and use it in your app.
So your string will be:
<string name="emoji">Hi 👈</string>
Output:
For more information please check here
Using HTML encoding is not working for me, at least when using the HTML code as ૌ
for the red heart emoji in the translation editor. I copied the unicode number from https://emojipedia.org/emoji/%E2%9D%A4/
However, just pasting it as the emoji character from clipboard ❤️ direct into the translations editor worked just fine, and perhaps I needn't have worried at all.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.