cmd.exe on WIndows - problem with displaying some Unicode characters

Chris Angelico rosuav at gmail.com
Sun Aug 3 19:08:22 EDT 2014


On Mon, Aug 4, 2014 at 8:52 AM, Wiktor <look at signature.invalid> wrote:
> I have to ask - is there a way to make that original concept work? I know,
> that CP437 has symbols "╖", "╢" and "╘", but does not have polish letters -
> and I need to display them too.

Yeah, that's exactly the problem with codepages :)

The best way to do it is to use the Unicode codepage, but cmd.exe just
plain has issues. There are underlying Windows APIs for displaying
text that have problems with astral characters (I think that's what it
is), so ultimately, you're largely stuck.

One option would be to render the whole thing graphically, abandoning
cmd.exe altogether. That would be how a lot of telnet and SSH clients
will do the work. Get a proper Unicode-supporting toolkit (Tkinter has
issues with astral characters too, AIUI), and yes, you'll have to do a
lot of work yourself. Or maybe, grab an actual telnet client, and
write this as a socket server. I'd be delighted to help you with that
option - I'm a MUDder and have spent innumerable dev hours on telnet
clients!

ChrisA



More information about the Python-list mailing list