[issue21164] print unicode in Windows console

2014-04-11 Thread Terry J. Reedy

Terry J. Reedy added the comment:

You can change the code page of a Command Prompt window, before calling Python, 
with ... chcp code-page. There is 'something' called cp65001 that is 
supposed to be a utf-8 codepage. Once can change to it, but it does not work 
right. This has been discussed on StackOverflow and elsewhere.

The Idle Shell, running on tkinter, handles everything in the BMP because 
tcl/tk is unicode (ucs-2) based. The characters that display properly depend on 
the font you select. On my machine, all but three of the following arbitrary 
codepoints display proper characters.
 print('\u\u\u\u\u\u\u\u\u\u\u\u\u\u')
ᄑ∢㌳䑄啕晦睷袈香ꪪ뮻쳌�

--
nosy: +terry.reedy
resolution:  - duplicate
status: open - closed
superseder:  - windows console doesn't print or input Unicode

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21164
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21164] print unicode in Windows console

2014-04-11 Thread Leslie Klein

Leslie Klein added the comment:

I start ipython in Windows PowerShell. The console I am referring to is
ipython running in WindowsPowerShell.
I do not use the DOS cmd.exe

When running ipython notebook from WindowsPowerShell -- no problem printing
unicode.

When running in PTVS (Python Tools for Visual Studio) debugger -- no
problem printing unicode in Output window, or Interactive Python window.
Problem does appear in Console window (which is the DOS window I believe).

On Mon, Apr 7, 2014 at 7:08 AM, STINNER Victor rep...@bugs.python.orgwrote:


 STINNER Victor added the comment:

 Hi, when you say The console is the the old MS-DOS command (Windows
 console) opened when you run the cmd.exe program? Or IDLE or another
 console?

 For the Windows console, see the old issue #1602 which is not fixed yet.

 On Windows, sys.stdout.encoding is your OEM code page, which is usually
 different than the ANSI code page (locale.getpreferredencoding()).

 --
 nosy: +haypo

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue21164
 ___


--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21164
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21164] print unicode in Windows console

2014-04-07 Thread STINNER Victor

STINNER Victor added the comment:

Hi, when you say The console is the the old MS-DOS command (Windows 
console) opened when you run the cmd.exe program? Or IDLE or another console?

For the Windows console, see the old issue #1602 which is not fixed yet.

On Windows, sys.stdout.encoding is your OEM code page, which is usually 
different than the ANSI code page (locale.getpreferredencoding()).

--
nosy: +haypo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21164
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21164] print unicode in Windows console

2014-04-06 Thread Leslie Klein

New submission from Leslie Klein:

The console behaves by encoding a str (using the sys.getdefaultencoding()) and 
then decodes the bytes to a glyph for rendering. The decoder used is 'cp437'. 
Apparently, there is no way to override that!

See ipython notebook for summary and example of the issue.

nbviewer.ipython.org/gist/LeslieK/10013426

--
components: Windows
messages: 215675
nosy: LeslieK
priority: normal
severity: normal
status: open
title: print unicode in Windows console
type: behavior
versions: Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21164
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com