Message125852
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.) |
|
Date |
User |
Action |
Args |
2011-01-09 19:23:58 | davidsarah | set | recipients:
+ davidsarah, lemburg, tzot, amaury.forgeotdarc, pitrou, vstinner, christian.heimes, tim.golden, mark, christoph, ezio.melotti, v+python, ssbarnea, brian.curtin, BreamoreBoy, David.Sankel |
2011-01-09 19:23:58 | davidsarah | set | messageid: <1294601038.4.0.0317333350699.issue1602@psf.upfronthosting.co.za> |
2011-01-09 19:23:56 | davidsarah | link | issue1602 messages |
2011-01-09 19:23:56 | davidsarah | create | |
|