Changing the Encoding

Under Windows, the Tcl client is not able to reliably determine the character encoding used by the terminal. The Tcl client therefore assumes that the encoding typically used under Windows, cp1252, is active. If this is not the case or if data in a different or more extensive encoding (such as UTF-8) needs to be transferred, the terminal’s encoding must be set accordingly. This can be done by means of the following commands (UTF-8 serves as an example here):

CM>fconfigure stdout -encoding utf-8
CM>fconfigure stdin -encoding utf-8
CM>fconfigure stderr -encoding utf-8

Additionally it can be necessary to adapt the encoding of the data read from or written to files. This is required, for example, for sourced scripts to be interpreted correctly. Please use the following command for this:

CM>encoding system utf-8