ankushsachdeva / emojicon

Android library to show emojicon dialog box over soft keyboard
283 stars 149 forks source link

getText() doesn't return emoji code #18

Open mikilkumar opened 9 years ago

mikilkumar commented 9 years ago

Emoji's appear perfectly on edittext and textview. But when we do getText() on edittext, it returns empty strings, instead of unique codes for each emojis added.

ankushsachdeva commented 9 years ago

This is not an expected behaviour. Could you share you code snippet

Amritpal33 commented 9 years ago

Hi ankush, I am facing a similar issue. instead of getting any unicode from _emojiconEditText.getText().toString();

i am getting "������" value. kindly suggest what could be the issue..

ankushsachdeva commented 9 years ago

If the software you are using to view the text does not support the complete UTF8 encoding, you'll see these question marks. Try to print the text on a modern browser

Amritpal33 commented 9 years ago

Hi Ankush, I am using Android studio and i found this text while debugging. Also when i try to send the text obtained from edit text to server it gives me parse error as it receives the same. do i need to change some encoding settings in Studio..?

is there a method to get the unicode against each emoji to be sent over the network.

mikilkumar commented 9 years ago

I managed to get it working by encoding characters to utf-8. now im encountered with another problem. When using build tools 21.1.2 and compiling on api level 21, the emoji popup doesn't appear.clicking on the emoji icon just opens the keyboard. Please help

Amritpal33 commented 9 years ago

Hi Miki,

 Can you post some code how you have encoded chars to utf-8 as i have tried every thing but failed.

Thanks.

mikilkumar commented 9 years ago

Set this when sending data to webservice. httpPost.setEntity(new UrlEncodedFormEntity(params, "UTF-8"));

And also set encoding on php script. ini_set('default_charset', 'UTF-8');

MustanserIqbal93 commented 8 years ago

Hi @mikilkumar can you share code for sending request to server. because i tried UTF-8 encoding but it is not work. Thanks