Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'url:pypi': 0.03; 'suppose': 0.07; 'ascii': 0.09; 'polish': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:characters': 0.09; 'posted': 0.15; 'windows': 0.15; '[1].': 0.16; 'fancy': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'subject:Unicode': 0.16; 'sure.': 0.16; 'wrote:': 0.18; 'drawing': 0.19; '>>>': 0.22; 'aug': 0.22; 'print': 0.22; 'header:User-Agent:1': 0.23; 'instead.': 0.24; 'simpler': 0.24; 'subject:problem': 0.24; 'unicode': 0.24; 'mon,': 0.24; 'source': 0.25; 'post': 0.26; 'header:X-Complaints-To:1': 0.27; 'tried': 0.27; '[1]': 0.29; '[2]': 0.30; 'characters': 0.30; 'skip:( 20': 0.30; "i'm": 0.30; 'lines': 0.31; 'url:wiki': 0.31; 'subject:some': 0.31; 'url:wikipedia': 0.31; 'writes:': 0.31; 'allows': 0.31; 'probably': 0.32; 'interface': 0.32; 'text': 0.33; 'url:python': 0.33; 'not.': 0.33; 'could': 0.34; 'subject:with': 0.35; "can't": 0.35; 'but': 0.35; 'add': 0.35; 'there': 0.35; 'version': 0.36; 'next': 0.36; 'url:org': 0.36; 'message- id:@gmail.com': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'letters': 0.60; 'first': 0.61; 'taking': 0.65; '8bit%:96': 0.70; '8bit%:94': 0.72; '8bit%:97': 0.74; 'step,': 0.84; 'received:89': 0.85; 'skip:\xe2 30': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Akira Li <4kir4.1i@gmail.com> Subject: Re: cmd.exe on WIndows - problem with displaying some Unicode characters Date: Tue, 05 Aug 2014 04:51:15 +0400 References: <1g317psebknmz.3r1n3q3igpkt.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: 89.169.229.68 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:BH8PBMv/OKO/E9Fpa+04je8nyas= X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 38 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1407199889 news.xs4all.nl 2843 [2001:888:2000:d::a6]:39206 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:75716 Wiktor writes: > On Mon, 04 Aug 2014 15:17:04 -0400, Terry Reedy wrote: > >>> I'm taking next step, so I tried to draw nice frame around menu (that's >>> why I posted yesterday). >> >> Is there no working codepage with ascii text and the line chars? I >> suppose I am not surprised if not. > > With single line (└┘┌┐─│├┤┬┴┼) and double line (╣║╗╝╚╔╩╦╠═╬) - many > codepages, CP852 for sure. > > With corners/crosses where single and double lines meet (╖╘╡╢╕╜╛╞╟ > ╧╨╤╥╙╘╒╓╫╪) - I know only one: CP437. > > But I can't have both - Polish letters and all those line chars, so I > can't do this fancy frame from first post with Polish strings inside. There > will be simpler version instead. Unicode has line drawing characters [1]. win_unicode_console [2] allows to print Unicode in cmd.exe. win_unicode_console and colorama will probably conflict. You could look at the source to see how hard to combine both functionalities. [1] http://en.wikipedia.org/wiki/Box-drawing_character [2] https://pypi.python.org/pypi/win_unicode_console btw, blessings [3] provides an easy-to-use interface if you need to add colors and move text in a terminal. It claims that it also supports colors on Windows if used with colorama. [3] https://pypi.python.org/pypi/blessings/ -- Akira