Java: how to convert unicode string Emoji to Integer -


i received unicode string contain emoji code, example: "u+1f44f" (from emoji table : http://apps.timwhitlock.info/emoji/tables/unicode).

i want convert string integer how can ?

i tried this, crashs:

int hex = integer.parseint(unicodestr, 16); 

thanks guys!

the comment of flkes gives correct answere. u+ indicates following codepoint (or hex number) unicode. value want convert integer codepoint, have omit 2 first characters .substring(2)

you wil obtain following code:

int hex = integer.parseint(unicodestr.substring(2), 16);

Comments

Popular posts from this blog

php - Passing multiple values in a url using checkbox -

compilation - PHP install fails on Ubuntu 14 (make: *** [sapi/cli/php] Error 1) PHP 5.6.20 -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -