Roger Travis
Roger Travis

Reputation: 8548

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".

What do you think would be the best way to combine them?

P.S. Thanks, "a\u030c" does give â in logcat, but on android itself, it just shows a blank square. Is there a way to fix it without having the users to install additional fonts?

Upvotes: 3

Views: 5888

Answers (3)

Mihai Nita
Mihai Nita

Reputation: 5787

You should not hard-code your own mapping tables.

What you need is this: http://developer.android.com/reference/java/text/Normalizer.html

Upvotes: 1

Joop Eggen
Joop Eggen

Reputation: 109613

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

Upvotes: 5

Alexander Pogrebnyak
Alexander Pogrebnyak

Reputation: 45616

If you mean string literal, then

String str = "a\u030c";

Upvotes: 1

Related Questions