I'm trying to output emoji in Telegram
automatically using python library pyautogui
but however i found it impossible to just typewrite
it. I searched for libraries to help me solve my problem and i found pyemojify
and emoji
but in both cases i faced
UnicodeEncodeError: 'charmap' codec can't encode characters: character maps to <undefined>
and the code is:
from pyemojify import emojify
print(emojify("Life is short :smile: , use :sparkles: Python :sparkles:"))
and this:
import emoji
print(emoji.emojize('Python is :thumbs_up_sign:'))
i searched here a lot but none of the answers finally worked for me.
Now i have two questions: is there any way to output an emoji in Telegram
using python pyautogui
or even using java Robot
class? and the second question is how i should fix UnicodeEncodeError
in my code? Thanks in advance :)