Print emojis in Python [duplicate]
This question already has an answer here:
Display Emoji in Python's console
3 answers
I've been trying to print emojis in Python, so I first tried the Unicode input with print("😊")
for example. It returned me this:
So I looked for another solution and saw the Emoji module, but this time it returned me this error:
====== RESTART: C:UsersZapdexioDesktopEmojis.py ======
Traceback (most recent call last):
File "C:UsersZapdexioDesktopPythonTkinterTestEmojis.pyw", line 2, in <module>
print(emoji.emojize('Python is :thumbs_up:'))
UnicodeEncodeError: 'UCS-2' codec can't encode characters in position 10-10: Non-BMP character not supported in Tk
The code was this one:
import emoji
print(emoji.emojize('Python is :thumbsup:', use_aliases=True))
Could someone help me please? ;-;
python printing emoji
marked as duplicate by jpp, Unheilig, Mark Rotteveel, SHR, CozyAzure Nov 25 '18 at 16:43
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
Display Emoji in Python's console
3 answers
I've been trying to print emojis in Python, so I first tried the Unicode input with print("😊")
for example. It returned me this:
So I looked for another solution and saw the Emoji module, but this time it returned me this error:
====== RESTART: C:UsersZapdexioDesktopEmojis.py ======
Traceback (most recent call last):
File "C:UsersZapdexioDesktopPythonTkinterTestEmojis.pyw", line 2, in <module>
print(emoji.emojize('Python is :thumbs_up:'))
UnicodeEncodeError: 'UCS-2' codec can't encode characters in position 10-10: Non-BMP character not supported in Tk
The code was this one:
import emoji
print(emoji.emojize('Python is :thumbsup:', use_aliases=True))
Could someone help me please? ;-;
python printing emoji
marked as duplicate by jpp, Unheilig, Mark Rotteveel, SHR, CozyAzure Nov 25 '18 at 16:43
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
Display Emoji in Python's console
3 answers
I've been trying to print emojis in Python, so I first tried the Unicode input with print("😊")
for example. It returned me this:
So I looked for another solution and saw the Emoji module, but this time it returned me this error:
====== RESTART: C:UsersZapdexioDesktopEmojis.py ======
Traceback (most recent call last):
File "C:UsersZapdexioDesktopPythonTkinterTestEmojis.pyw", line 2, in <module>
print(emoji.emojize('Python is :thumbs_up:'))
UnicodeEncodeError: 'UCS-2' codec can't encode characters in position 10-10: Non-BMP character not supported in Tk
The code was this one:
import emoji
print(emoji.emojize('Python is :thumbsup:', use_aliases=True))
Could someone help me please? ;-;
python printing emoji
This question already has an answer here:
Display Emoji in Python's console
3 answers
I've been trying to print emojis in Python, so I first tried the Unicode input with print("😊")
for example. It returned me this:
So I looked for another solution and saw the Emoji module, but this time it returned me this error:
====== RESTART: C:UsersZapdexioDesktopEmojis.py ======
Traceback (most recent call last):
File "C:UsersZapdexioDesktopPythonTkinterTestEmojis.pyw", line 2, in <module>
print(emoji.emojize('Python is :thumbs_up:'))
UnicodeEncodeError: 'UCS-2' codec can't encode characters in position 10-10: Non-BMP character not supported in Tk
The code was this one:
import emoji
print(emoji.emojize('Python is :thumbsup:', use_aliases=True))
Could someone help me please? ;-;
This question already has an answer here:
Display Emoji in Python's console
3 answers
python printing emoji
python printing emoji
asked Nov 24 '18 at 22:49
ZapdexioZapdexio
317
317
marked as duplicate by jpp, Unheilig, Mark Rotteveel, SHR, CozyAzure Nov 25 '18 at 16:43
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by jpp, Unheilig, Mark Rotteveel, SHR, CozyAzure Nov 25 '18 at 16:43
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
looks like you're trying to run it on cmd,
in that case it has already been asked
Display Emoji in Python's console
add a comment |
displaying unicode correctly does require a few prerequisites:
- your script file has to be encoded in unicode (look at your code editor if it stores the file as unicode)
- your inteprter has to know that it should interpret the file as unicode encoded
- add a line like
# -*- coding: utf-8 -*-
to your source file: (it has to match the regexcoding[:=]s*([-w.]+)
- add a line like
- your output device has to suuport unicode
- may be the
cmd
can be configured, but i doubt that it can display emojiis - maybe use an arbitrary console
- may be the
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
looks like you're trying to run it on cmd,
in that case it has already been asked
Display Emoji in Python's console
add a comment |
looks like you're trying to run it on cmd,
in that case it has already been asked
Display Emoji in Python's console
add a comment |
looks like you're trying to run it on cmd,
in that case it has already been asked
Display Emoji in Python's console
looks like you're trying to run it on cmd,
in that case it has already been asked
Display Emoji in Python's console
answered Nov 24 '18 at 22:58
prophet-fiveprophet-five
1089
1089
add a comment |
add a comment |
displaying unicode correctly does require a few prerequisites:
- your script file has to be encoded in unicode (look at your code editor if it stores the file as unicode)
- your inteprter has to know that it should interpret the file as unicode encoded
- add a line like
# -*- coding: utf-8 -*-
to your source file: (it has to match the regexcoding[:=]s*([-w.]+)
- add a line like
- your output device has to suuport unicode
- may be the
cmd
can be configured, but i doubt that it can display emojiis - maybe use an arbitrary console
- may be the
add a comment |
displaying unicode correctly does require a few prerequisites:
- your script file has to be encoded in unicode (look at your code editor if it stores the file as unicode)
- your inteprter has to know that it should interpret the file as unicode encoded
- add a line like
# -*- coding: utf-8 -*-
to your source file: (it has to match the regexcoding[:=]s*([-w.]+)
- add a line like
- your output device has to suuport unicode
- may be the
cmd
can be configured, but i doubt that it can display emojiis - maybe use an arbitrary console
- may be the
add a comment |
displaying unicode correctly does require a few prerequisites:
- your script file has to be encoded in unicode (look at your code editor if it stores the file as unicode)
- your inteprter has to know that it should interpret the file as unicode encoded
- add a line like
# -*- coding: utf-8 -*-
to your source file: (it has to match the regexcoding[:=]s*([-w.]+)
- add a line like
- your output device has to suuport unicode
- may be the
cmd
can be configured, but i doubt that it can display emojiis - maybe use an arbitrary console
- may be the
displaying unicode correctly does require a few prerequisites:
- your script file has to be encoded in unicode (look at your code editor if it stores the file as unicode)
- your inteprter has to know that it should interpret the file as unicode encoded
- add a line like
# -*- coding: utf-8 -*-
to your source file: (it has to match the regexcoding[:=]s*([-w.]+)
- add a line like
- your output device has to suuport unicode
- may be the
cmd
can be configured, but i doubt that it can display emojiis - maybe use an arbitrary console
- may be the
answered Nov 25 '18 at 12:20
vlad_tepeschvlad_tepesch
4,0731755
4,0731755
add a comment |
add a comment |