I am new to Python. I have python telegram bot on my raspberry pi. The bot displays markup keyboard buttons these buttons contains emoji and text and some of them only emoji.

How can I compare text in Python which includes emoji Bytes (utf-8) with text entered by user
python telegram bot
https://github.com/eternnoir/pyTelegramBotAPI
emojii taken from
http://apps.timwhitlock.info/emoji/tables/unicode
here is snippet of my code
Code: Select all
### \xF0\x9F\x93\xB7 is camera emoji
str = 'CAPTURE \xF0\x9F\x93\xB7'
# first comparsion try
# message.text entered by user
if(message.text == u'CAPTURE \xF0\x9F\x93\xB7' )
### do something
# second comparsion try
if(message.text == 'CAPTURE \xF0\x9F\x93\xB7' )
### do something### error message
UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal