android - 在 strings.xml 中使用 Unicode 字符

标签 android string unicode

我想在字符串中使用以下 unicode 字符:🚕

我通过 this 找到了它的十六进制和十进制代码:

虽然我知道如何在 strings.xml 中的字符串中使用“&”符号,但这样做:

    <string name="Example">Example character &amp;</string>

我不能使用汽车标志。

如何在 strings.xml 的字符串中使用此 unicode 字符?

更新一:

按照使用这个的第一个解决方案:🚗 我收到以下错误:ERROR IN APPLICATION: input is not valid Modified UTF-8:

最佳答案

这是

<string name="Example">Example character \u0026</string>

在此处查看更多 unicode 字符:

http://www.utf8-chartable.de/unicode-utf8-table.pl?number=1024&utf8=0x

关于android - 在 strings.xml 中使用 Unicode 字符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36666543/

相关文章:

javascript - 阐明 <form action ="?"method ="post"> which submits to string.match ("site:mysite.net")

c++ - 16 位 wchar_t 是否正式代表完整的 Unicode?

android - 使用 XML 填充 SQLite 并集成到 Activity 内部

android - 我是否需要使用从我的 insert() 方法返回的相同 URI 来获取一行

python - 如何将元音的大写保持在同一位置?

java String.getBytes 行为

Perl、Starman Unicode 宽字符在 syswrite 中

c# - 如何检索包含印地文文本的字符串中char的unicode十进制表示形式?

android - setCompoundDrawableTintList 的向后兼容解决方案

java - Android - 获取 Google Places Photos 和 API 调用