encoding system ?encoding?
Set the system encoding to encoding. If encoding is omitted then the command returns the current system encoding. The system encoding is used whenever Tcl passes strings to system calls.
RS 2005-06-14: On Windows, a different encoding is used for consoles (cmd.exe). You can find out which with
fconfigure stdout -encoding
which gives cp437 for KBK in New York and me in Germany. Reconfiguring stdout doesn't really work - even if you
fconfigure stdout -encoding cp1252
the stubborn thing still stays with cp437...
MG does this on 2005-06-16, on Win XP in Britain. When I run the 'Command Prompt', cmd.exe, or tclsh.exe
fconfigure stdout -encoding
begins as cp850, and trying to change it, then check it, with the same command seems to be successful. When I run Wish and check fconfigure stdout -encoding in the ('console show') console, it starts as utf-8, and is again changable. In all of the above, though, encoding system is cp1252.
See also: