Message96809
re Martin's question, I can offer the indirect wisdom of Michael Kaplan
in this blog post:
http://blogs.msdn.com/michkap/archive/2008/03/18/8306597.aspx
where he mentions that the easiest way to output unicode text in the
Windows console, is:
int main(void) {
_setmode(_fileno(stdout), _O_U16TEXT);
wprintf(L"\x043a\x043e\x0448\x043a\x0430 \x65e5\x672c\x56fd\n");
return 0;
}
_setmode being the special call needed.
I haven't tested with any _O_U8TEXT (if such a thing exists), I don't do
Windows anymore, therefore I can't provide a patch.
It also seems that Python —when stdin/stdout/stderr is under control of
a Windows console— doesn't use plain *printf functions. The example code
I offered in one of the other issues (dumb stdout doing plain .write as
UTF-8) runs and displays fine. |
|
Date |
User |
Action |
Args |
2009-12-22 19:23:44 | tzot | set | recipients:
+ tzot, lemburg, loewis, pitrou, ezio.melotti, michael.foord, skrah |
2009-12-22 19:23:44 | tzot | set | messageid: <1261509824.69.0.223011182118.issue6058@psf.upfronthosting.co.za> |
2009-12-22 19:23:43 | tzot | link | issue6058 messages |
2009-12-22 19:23:43 | tzot | create | |
|