Print emojis in Python [duplicate]












0
















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:



The image, not working



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? ;-;










share|improve this 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.























    0
















    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:



    The image, not working



    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? ;-;










    share|improve this 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.





















      0












      0








      0









      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:



      The image, not working



      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? ;-;










      share|improve this question















      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:



      The image, not working



      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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      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.


























          2 Answers
          2






          active

          oldest

          votes


















          2














          looks like you're trying to run it on cmd,
          in that case it has already been asked
          Display Emoji in Python's console






          share|improve this answer































            0














            displaying unicode correctly does require a few prerequisites:




            1. your script file has to be encoded in unicode (look at your code editor if it stores the file as unicode)

            2. 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 regex coding[:=]s*([-w.]+)



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








            share|improve this answer






























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              2














              looks like you're trying to run it on cmd,
              in that case it has already been asked
              Display Emoji in Python's console






              share|improve this answer




























                2














                looks like you're trying to run it on cmd,
                in that case it has already been asked
                Display Emoji in Python's console






                share|improve this answer


























                  2












                  2








                  2







                  looks like you're trying to run it on cmd,
                  in that case it has already been asked
                  Display Emoji in Python's console






                  share|improve this answer













                  looks like you're trying to run it on cmd,
                  in that case it has already been asked
                  Display Emoji in Python's console







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 24 '18 at 22:58









                  prophet-fiveprophet-five

                  1089




                  1089

























                      0














                      displaying unicode correctly does require a few prerequisites:




                      1. your script file has to be encoded in unicode (look at your code editor if it stores the file as unicode)

                      2. 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 regex coding[:=]s*([-w.]+)



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








                      share|improve this answer




























                        0














                        displaying unicode correctly does require a few prerequisites:




                        1. your script file has to be encoded in unicode (look at your code editor if it stores the file as unicode)

                        2. 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 regex coding[:=]s*([-w.]+)



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








                        share|improve this answer


























                          0












                          0








                          0







                          displaying unicode correctly does require a few prerequisites:




                          1. your script file has to be encoded in unicode (look at your code editor if it stores the file as unicode)

                          2. 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 regex coding[:=]s*([-w.]+)



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








                          share|improve this answer













                          displaying unicode correctly does require a few prerequisites:




                          1. your script file has to be encoded in unicode (look at your code editor if it stores the file as unicode)

                          2. 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 regex coding[:=]s*([-w.]+)



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









                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Nov 25 '18 at 12:20









                          vlad_tepeschvlad_tepesch

                          4,0731755




                          4,0731755















                              Popular posts from this blog

                              Costa Masnaga

                              Fotorealismo

                              Sidney Franklin