Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/58.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在android textview中编写逗号分隔的unicode_Android_Unicode_Hex - Fatal编程技术网

在android textview中编写逗号分隔的unicode

在android textview中编写逗号分隔的unicode,android,unicode,hex,Android,Unicode,Hex,你好,朋友,我有一个十六进制代码 String ss=54,44,24 我想用安卓系统写,如下所示 text.setText("\u54\u44\u24"); 但是告诉我诸如“无效Unicode”之类的错误。知道如何编写它吗?如果您想设置文本Unicode,那么您可以使用它 第二种方法是使用Html.fromHtml() 请试试这个: mport org.apache.commons.codec.binary.Hex; ... String hexString = Hex.encodeHe

你好,朋友,我有一个十六进制代码

String ss=54,44,24
我想用安卓系统写,如下所示

text.setText("\u54\u44\u24");

但是告诉我诸如“无效Unicode”之类的错误。知道如何编写它吗?

如果您想设置文本Unicode,那么您可以使用它

第二种方法是使用
Html.fromHtml()

请试试这个:

mport org.apache.commons.codec.binary.Hex;
...

String hexString = Hex.encodeHexString(myString.getBytes(/* charset */));

Milap:你能给我TAU_BHON.TTF文件下载链接吗?我试过你的代码,但我用这个TTF文件转换十六进制代码时没有得到RD$货币符号没有秒也不工作它显示像\u2741不是RD$符号你想打印什么?让我们看看。Milad:我怎么写字符集?
tv.setText(Html.fromHtml("\\u27A1");
mport org.apache.commons.codec.binary.Hex;
...

String hexString = Hex.encodeHexString(myString.getBytes(/* charset */));