Android - 将 Unicode 转换为 HTML 实体

Android - Convert Unicode to HTML Entity

中所述,您需要像这样使用 Unicode 笑脸符号:

https://apps.timwhitlock.info/emoji/tables/unicode

as HTML Entity 但他为什么不提到如何将它们转换为 HTML Entity。

我尝试了各种在线转换器,例如 https://www.online-toolz.com/tools/text-html-entities-convertor.php,但它们无法将 U+1F601 之类的东西转换成任何东西。

谁能赐教一下?

这比你想象的要简单:U+1F601对应于😁

对Henry的回答稍作修改,您可以使用如下。

<string name="hello_world">Hello world! &#128513;</string>
// this is using in decimal

但我发现它在 Lollipop 及以下版本中出现 运行 时间错误。 它适用于棉花糖及以上。