Re: console output in 8.4.12 on windows
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: console output in 8.4.12 on windows

From: Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
Date: Fri Dec 30 2005 - 12:49:15 CET

Hi David,

David Gravereaux writes:
> PS. That code I presented _should not_ be used as it would be a
> horrible performance hit.
>
> Just in case anyone missed my point.

;-) That would be me.

I'd want to measure the effect though, before dismissing this
technique as too slow. I would think that SetConsoleCP() should just
set a flag in some structure, so it might be cheap. And console
output is pretty slow anyway.

I understand the alternative would be to add a hook into [fconfigure
-encoding]. But there I would just disallow the change, if that were
possible. On NT, switching away from Unicode seems useless to me. On
W9x/Me SetConsoleCP() and SetConsoleOutputCP() are not supported at
all.

Or maybe in the end we should really just document this as "On
Windows: Don't do this."

benny
Received on Tue Jan 3 03:09:46 2006