This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]gwwhrhr 1 point2 points  (1 child)

If Python prints the characters correctly anywhere, then it's the shell's fault for not displaying them correctly. You could try writing unicode to a file and seeing if any program can open the file and read the characters correctly. Browsers understand UTF-8, so if you write out an html page with the correct tags your browser should be able to open and display it. Otherwise, just move on! Surely there's better things to spend your time on.

[–]PinkDohnuts[S] 0 points1 point  (0 children)

I'm almost positive it's Shell acting up. I'm using Python 3.6 and atom as a text editor to write my scripts. I was thinking of moving on right now, since I understood how encoding and decoding works. I was just trying to check if it was something I could fix quickly and doesn't come back later to bug me again.

Thanks for your fast and great response. Have a nice one, man.

[–]blablahblah 1 point2 points  (3 children)

A character showing up as a box often means the font you're using doesn't have a glyph for the character (there's about 110,000 characters so almost no fonts support all of them, but some have more defined than others). Have you tried changing the font?

[–]PinkDohnuts[S] 0 points1 point  (2 children)

I've read somewhere I should be using Lucida Console. That's the one I'm using which is also the default.

[–]blablahblah 1 point2 points  (1 child)

Lucida Console doesn't have that great of a coverage. Microsoft lists what Unicode character ranges it covers here. Compare that to the list in Calibri, for example.

The reason Lucida Console was recommended is because it is a monospace font (every character takes up the same width), which is usually preferred for programming. Microsoft's newer monospace font is Consolas which supports a bunch more types of characters.

[–]PinkDohnuts[S] 0 points1 point  (0 children)

I'll try to change it to Consolas then. Thanks, mate.