Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #75634

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

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder1.xlned.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <v+python@g.nevcal.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.009
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'python.': 0.02; 'irc': 0.05; 'output': 0.05; 'desired.': 0.07; 'pypi': 0.07; 'apis': 0.09; 'polish': 0.09; 'subject:characters': 0.09; 'python': 0.11; 'bug': 0.12; 'mostly': 0.14; "wouldn't": 0.14; 'windows': 0.15; '(both': 0.16; "(i'm": 0.16; '4:25': 0.16; 'displaying': 0.16; 'insights': 0.16; 'subject:Unicode': 0.16; 'underlying': 0.16; 'unicode,': 0.16; 'using,': 0.16; 'language': 0.16; 'wrote:': 0.18; 'discussion': 0.18; 'drawing': 0.19; 'possible,': 0.19; 'properly': 0.19; 'written': 0.21; 'command': 0.22; 'input': 0.22; 'header:User-Agent:1': 0.23; 'documented': 0.24; 'subject:problem': 0.24; 'unicode': 0.24; 'fine': 0.24; '(or': 0.24; 'source': 0.25; 'logging': 0.26; 'least': 0.26; 'header:In- Reply-To:1': 0.27; 'fixed': 0.29; 'chris': 0.29; 'url:bugs': 0.29; '[1]': 0.29; 'url:code': 0.29; 'andrew': 0.30; 'characters': 0.30; 'along': 0.30; '(my': 0.31; 'font': 0.31; 'subject:some': 0.31; 'weeks': 0.32; 'quite': 0.32; 'text': 0.33; 'url:python': 0.33; 'plain': 0.33; 'subject:with': 0.35; 'display': 0.35; 'something': 0.35; 'but': 0.35; 'there': 0.35; 'really': 0.36; 'largely': 0.36; 'thanks': 0.36; 'received:10.0': 0.36; 'url:org': 0.36; 'should': 0.36; 'received:10': 0.37; 'clear': 0.37; 'problems': 0.38; 'presently': 0.38; 'needed': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'recent': 0.39; 'does': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'enough': 0.39; 'even': 0.60; 'then,': 0.60; 'received:unknown': 0.61; 'hope': 0.61; 'issues,': 0.61; 'mentioned': 0.61; 'matter': 0.61; "you're": 0.61; 'url:p': 0.64; 'provide': 0.64; 'more': 0.64; 'different': 0.65; 'finally': 0.65; 'worth': 0.66; 'between': 0.67; 'received:bluehost.com': 0.68; 'containing': 0.69; 'default': 0.69; 'integrated': 0.69; 'programs,': 0.74; 'bot': 0.84; 'consolas': 0.84; 'console,': 0.84; 'describes': 0.84; 'glenn': 0.84; 'received:69.89': 0.84; 'difficult,': 0.91
X-Authority-Analysis v=2.1 cv=LbyvtFvi c=1 sm=1 tr=0 a=bHMQH+OLnPEWGwbUEerQzQ==:117 a=bHMQH+OLnPEWGwbUEerQzQ==:17 a=cNaOj0WVAAAA:8 a=f5113yIGAAAA:8 a=tcnv99F1KMcA:10 a=NQx7NIpX_PoA:10 a=WiSE-OA02TIA:10 a=aDqhzxAoLLkA:10 a=9HSTQGAzAAAA:8 a=7j9GTTBHwvYA:10 a=foBewTYRo0cA:10 a=r77TgQKjGQsHNAKrUKIA:9 a=9iDbn-4jx3cA:10 a=cKsnjEOsciEA:10 a=1XWaLZrsAAAA:8 a=8AHkEIZyAAAA:8 a=BbBnAYKEXf55L6qVYBcA:9 a=QEXdDO2ut3YA:10 a=4dHKCtPdTBLMGM0QbtAA:9 a=_CiGViYJmDLtn5bJ:21 a=_W_S_7VecoQA:10
Date Sun, 03 Aug 2014 17:17:59 -0700
From Glenn Linderman <v+python@g.nevcal.com>
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
MIME-Version 1.0
To python-list@python.org
Subject Re: cmd.exe on WIndows - problem with displaying some Unicode characters
References <yxht7c4so8ud.kqpa5p5iv0mp.dlg@40tude.net> <CAPTjJmqqw1k3NY4zo7tLnDKTzgP6RyXaqZ-7B7R7uC6Rndr2fQ@mail.gmail.com> <53DEC4F5.8090805@my.hennepintech.edu>
In-Reply-To <53DEC4F5.8090805@my.hennepintech.edu>
Content-Type multipart/alternative; boundary="------------010408010606090305060806"
X-Identified-User {1756:box1033.bluehost.com:areliabl:nevcal.com} {sentby:smtp auth 75.141.227.179 authed with test@nevcal.com}
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.12607.1407111494.18130.python-list@python.org> (permalink)
Lines 116
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1407111494 news.xs4all.nl 2894 [2001:888:2000:d::a6]:36771
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:75634

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

On 8/3/2014 4:25 PM, Andrew Berg wrote:
> On 2014.08.03 18:08, Chris Angelico wrote:
>> 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.
> That is not quite true. The terminal has these issues, not the shell. Using
> cp65001 does make Unicode in a Windows terminal possible, but using a better
> terminal[1] makes it almost perfect (my experience has been that input can be
> difficult, but output works well). I personally have used an IRC bot written in
> Python with logging output containing Unicode characters that display just fine
> (both locally and over SSH).
>
> [1] I recommend ConEmu: https://code.google.com/p/conemu-maximus5/
I will be reading more about conemu, thanks for the reference.

http://bugs.python.org/issue1602  describes 7 years worth of discussion 
of the problems with the console/terminal used by default by cmd.exe and 
other Windows command line programs, versus Python.

The recent insights in the last couple weeks have given me hope that 
Python might be able to be fixed to work properly with the default 
Windows console at long last... at least for non-astral characters (I'm 
not sure whether or not the Windows console supports non-BMP characters).

For this OP problem, it is mostly a matter of finding a fixed-width font 
that supports the box drawing characters and the Polish characters that 
are desired.  Lucida Console has a fair repertoire, and Consolas has a 
fair repertoire, in the fixed-width font arena. There may be others, 
documented on Polish language web sites that I wouldn't know about, and 
I don't know enough Polish to be sure those I mentioned suffice.

And then, the workarounds mentioned in the above-referenced bug or on 
the GitHub or PyPi sites mentioned should provide any needed additional 
solutions... and hopefully something along this line finally integrated 
into Python so that it can finally be said that Python supports Unicode 
properly on Windows (or at least as properly as Windows allows... but it 
is pretty clear that Windows supports Unicode, even for the console, 
using different APIs that Python is presently using, and that mismatch 
between APIs is really the source of the problems with using Unicode in 
Python on Windows).

Glenn

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

cmd.exe on WIndows - problem with displaying some Unicode characters Wiktor <look@signature.invalid> - 2014-08-04 00:52 +0200
  Re: cmd.exe on WIndows - problem with displaying some Unicode characters Chris Angelico <rosuav@gmail.com> - 2014-08-04 09:08 +1000
    Re: cmd.exe on WIndows - problem with displaying some Unicode characters Christian Gollwitzer <auriocus@gmx.de> - 2014-08-04 22:35 +0200
  Re: cmd.exe on WIndows - problem with displaying some Unicode characters Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-08-04 00:20 +0100
  Re: cmd.exe on WIndows - problem with displaying some Unicode characters Andrew Berg <aberg010@my.hennepintech.edu> - 2014-08-03 18:25 -0500
  Re: cmd.exe on WIndows - problem with displaying some Unicode characters Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-08-04 00:29 +0100
  Re: cmd.exe on WIndows - problem with displaying some Unicode characters Chris Angelico <rosuav@gmail.com> - 2014-08-04 09:39 +1000
  Re: cmd.exe on WIndows - problem with displaying some Unicode characters Chris Angelico <rosuav@gmail.com> - 2014-08-04 10:14 +1000
  Re: cmd.exe on WIndows - problem with displaying some Unicode characters Glenn Linderman <v+python@g.nevcal.com> - 2014-08-03 17:17 -0700
    Re: cmd.exe on WIndows - problem with displaying some Unicode characters wxjmfauth@gmail.com - 2014-08-04 01:47 -0700
  Re: cmd.exe on WIndows - problem with displaying some Unicode characters Glenn Linderman <v+python@g.nevcal.com> - 2014-08-03 21:14 -0700
  Re: cmd.exe on WIndows - problem with displaying some Unicode characters Andrew Berg <aberg010@my.hennepintech.edu> - 2014-08-04 00:06 -0500
  Re: cmd.exe on WIndows - problem with displaying some Unicode characters Terry Reedy <tjreedy@udel.edu> - 2014-08-04 04:39 -0400
    Re: cmd.exe on WIndows - problem with displaying some Unicode characters Wiktor <look@signature.invalid> - 2014-08-04 17:00 +0200
      Re: cmd.exe on WIndows - problem with displaying some Unicode characters Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2014-08-04 17:43 +0200
        Re: cmd.exe on WIndows - problem with displaying some Unicode characters Wiktor <look@signature.invalid> - 2014-08-04 18:48 +0200
          Re: cmd.exe on WIndows - problem with displaying some Unicode characters Chris Angelico <rosuav@gmail.com> - 2014-08-05 03:06 +1000
            Re: cmd.exe on WIndows - problem with displaying some Unicode characters Wiktor <look@signature.invalid> - 2014-08-04 19:22 +0200
              Re: cmd.exe on WIndows - problem with displaying some Unicode characters Terry Reedy <tjreedy@udel.edu> - 2014-08-04 15:43 -0400
      Re: cmd.exe on WIndows - problem with displaying some Unicode characters Terry Reedy <tjreedy@udel.edu> - 2014-08-04 15:17 -0400
        Re: cmd.exe on WIndows - problem with displaying some Unicode characters Wiktor <look@signature.invalid> - 2014-08-04 22:24 +0200
          Re: cmd.exe on WIndows - problem with displaying some Unicode characters Akira Li <4kir4.1i@gmail.com> - 2014-08-05 04:51 +0400
            Re: cmd.exe on WIndows - problem with displaying some Unicode characters wxjmfauth@gmail.com - 2014-08-05 00:38 -0700
            Re: cmd.exe on WIndows - problem with displaying some Unicode characters Wiktor <look@signature.invalid> - 2014-08-05 11:39 +0200
      Re: cmd.exe on WIndows - problem with displaying some Unicode characters Chris Angelico <rosuav@gmail.com> - 2014-08-05 06:11 +1000
      Re: cmd.exe on WIndows - problem with displaying some Unicode characters giacomo boffi <g@boffi.net> - 2014-08-04 22:53 +0200
  Re: cmd.exe on WIndows - problem with displaying some Unicode characters Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2014-08-04 10:46 +0200
  Re: cmd.exe on WIndows - problem with displaying some Unicode characters Glenn Linderman <v+python@g.nevcal.com> - 2014-08-04 02:46 -0700
  Re: cmd.exe on WIndows - problem with displaying some Unicode characters Glenn Linderman <v+python@g.nevcal.com> - 2014-08-04 02:53 -0700
  Re: cmd.exe on WIndows - problem with displaying some Unicode characters Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2014-08-04 12:24 +0200
  Re: cmd.exe on WIndows - problem with displaying some Unicode characters Andrew Berg <aberg010@my.hennepintech.edu> - 2014-08-04 05:33 -0500
  Re: cmd.exe on WIndows - problem with displaying some Unicode characters Glenn Linderman <v+python@g.nevcal.com> - 2014-08-04 11:04 -0700
  Re: cmd.exe on WIndows - problem with displaying some Unicode characters Glenn Linderman <v+python@g.nevcal.com> - 2014-08-04 11:15 -0700
    Re: cmd.exe on WIndows - problem with displaying some Unicode characters Grant Edwards <invalid@invalid.invalid> - 2014-08-04 19:30 +0000
  Re: cmd.exe on WIndows - problem with displaying some Unicode characters Terry Reedy <tjreedy@udel.edu> - 2014-08-04 15:25 -0400
  Re: cmd.exe on WIndows - problem with displaying some Unicode characters Tony the Tiger <tony@tiger.invalid> - 2014-08-05 20:26 +0000
    Re: cmd.exe on WIndows - problem with displaying some Unicode characters Grant Edwards <invalid@invalid.invalid> - 2014-08-05 20:41 +0000
    Re: cmd.exe on WIndows - problem with displaying some Unicode characters Wiktor <look@signature.invalid> - 2014-08-06 00:16 +0200
      Re: cmd.exe on WIndows - problem with displaying some Unicode characters Tony the Tiger <tony@tiger.invalid> - 2014-08-06 18:27 +0000
    Re: cmd.exe on WIndows - problem with displaying some Unicode characters wxjmfauth@gmail.com - 2014-08-05 23:30 -0700

csiph-web