[Python-Dev] GSoC: Replace MS Windows Console with Unicode UI

Aahz aahz at pythoncraft.com
Thu Jul 23 05:03:00 CEST 2009

On Thu, Jul 23, 2009, INADA Naoki wrote:
> I found WriteConsoleW() API recently.
> This API can write utf16 string to console directly, without change
> OutputCodepage.
> example:
> http://bitbucket.org/methane/hg-fixutf8-jp/src/tip/win32helper.py#cl-42
> I think this API is good for py3k.
> When stdout is console and not redirected to [pipe|file],
> sys.stdout.write(u"foo")
> can avoid encoding and use WriteConsoleW(L"foo")

Please submit a feature request to bugs.python.org -- with a patch would
be even nicer, of course.
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"The volume of a pizza of thickness 'a' and radius 'z' is
given by pi*z*z*a"

More information about the Python-Dev mailing list