emojicon icon indicating copy to clipboard operation
emojicon copied to clipboard

getText() doesn't return emoji code

Open mikilkumar opened this issue 9 years ago • 8 comments

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.

mikilkumar avatar May 07 '15 09:05 mikilkumar

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

ankushsachdeva avatar May 10 '15 12:05 ankushsachdeva

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

Amritpal33 avatar May 10 '15 15:05 Amritpal33

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

ankushsachdeva avatar May 10 '15 17:05 ankushsachdeva

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.

Amritpal33 avatar May 10 '15 18:05 Amritpal33

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

mikilkumar avatar May 11 '15 02:05 mikilkumar

Hi Miki,

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

Thanks.

Amritpal33 avatar May 11 '15 03:05 Amritpal33

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');

mikilkumar avatar May 11 '15 04:05 mikilkumar

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

MustanserIqbal93 avatar Oct 20 '16 09:10 MustanserIqbal93