简体   繁体   English

如何合并unicode字符?

[英]How to combine unicode characters?

Say I have a character "a" which I need to combine with a symbol ( ̌ ) which I have in form of a hex value "030c". 假设我有一个字符“ a”,我需要将其与十六进制值“ 030c”形式的符号(combine)组合在一起。

What do you think would be the best way to combine them? 您认为结合它们的最佳方法是什么?

PS Thanks, "a\̌" does give â in logcat, but on android itself, it just shows a blank square. PS谢谢,“ a \\ u030c”在logcat中确实提供了â,但在android本身上,它仅显示了一个空白方块。 Is there a way to fix it without having the users to install additional fonts? 有没有一种解决方法,而无需用户安装其他字体?

"a\u030c" or "\u01ce", the latter being the a-caron ǎ.

如果您的意思是字符串文字,那么

String str = "a\u030c";

You should not hard-code your own mapping tables. 您不应该对自己的映射表进行硬编码。

What you need is this: http://developer.android.com/reference/java/text/Normalizer.html 您需要的是: http : //developer.android.com/reference/java/text/Normalizer.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM