Author davidsarah
Recipients BreamoreBoy, David.Sankel, amaury.forgeotdarc, brian.curtin, christian.heimes, christoph, davidsarah, ezio.melotti, haypo, lemburg, mark, pitrou, sorin, tim.golden, tzot, v+python
Date 2011-01-09.19:23:56
SpamBayes Score 1.39299e-08
Marked as misclassified No
Message-id <1294601038.4.0.0317333350699.issue1602@psf.upfronthosting.co.za>
In-reply-to
Content
haypo wrote:
> davidsarah wrote:
>> It is certainly possible to write Unicode to the console 
>> successfully using WriteConsoleW
>
> Did you tried with characters not encodable to the code page and with character that cannot be rendeded by the font?

Yes, characters not encodable to the code page do work (as confirmed by Glenn Linderman, since code page 437 does not include Cyrillic).

Characters that cannot be rendered by the font print as missing-glyph boxes, as expected. They don't cause any other problem, and they can be cut-and-pasted to other Unicode-aware applications, showing up as the original characters.

> See msg120414 for my tests with WriteConsoleOutputW

Even if it handled encoding correctly, WriteConsoleOutputW (http://msdn.microsoft.com/en-us/library/ms687404%28v=vs.85%29.aspx) would not be the right API to use in any case, because it prints to a rectangle of characters without scrolling. WriteConsoleW does scroll in the same way that printing to a console output stream normally would. (Redirection to a non-console stream can be detected and handled differently, as the code in unicode2.py does.)
History
Date User Action Args
2011-01-09 19:23:58davidsarahsetrecipients: + davidsarah, lemburg, tzot, amaury.forgeotdarc, pitrou, haypo, christian.heimes, tim.golden, mark, christoph, ezio.melotti, v+python, sorin, brian.curtin, BreamoreBoy, David.Sankel
2011-01-09 19:23:58davidsarahsetmessageid: <1294601038.4.0.0317333350699.issue1602@psf.upfronthosting.co.za>
2011-01-09 19:23:56davidsarahlinkissue1602 messages
2011-01-09 19:23:56davidsarahcreate