I am trying to print different emojis in python using visual studio code. However, when I print some emojis (just using print()) some (not all) emojis get displayed using the wrong width, more specifically if a character is printed next to it it will over lap the emoji. This will make more sense visually:
For some emojis its perfectly fine:print("😃😄😂")
|
However for others this happens:print("😂🪵")
|
That's a log emoji (though it happens to many others as well), the face emoji overlaps the log emoji because vs-code doesn't give it the correct width (I'm pretty sure all emojis are twice as wide as a normal alphabetic character). This only happens in the Terminal not in the editor.I have absolutely no idea why this happens for only some emojisI have tried changing the font but it has absolutely no effect.
Not sure if this is helpful but I was previously using a different code editor where all emojis where displayed incorrectly i.e. Not being recognised as larger than a normal char however in that code editor all emojis where displayed that way so I just added a space after every emoji to stop them overlapping however in vs code only some are incorrect.(Adding spaces to just some emojis is very inconvenient and I don't see why this should be an issue in the first place)
If I try this in command prompt by typing python and then print("😂🪵")
it works fine, so I believe it is specifically an issue with VS Code's integrated terminal.
EDIT: I am using the latest version of vs code (1.78.0) and the latest version of python (3.11.3) and yes I am using windows. I would like to clarify what I mean by the vs code terminal, here is an image: ibb.co/J7tMCZX this issue is specific to running code inside the visual studio code application, If I open a command prompt window and navigate to the file path and type "python test.py" to run the file I get no issues.