All Manuals > LispWorks® User Guide and Reference Manual > 37 The HCL Package

set-console-external-format Function

Summary

Sets the external format of the console on non-Windows platforms.

Package

hcl

Signature

set-console-external-format external-format => stream

Arguments
external-format
An external format specification.
Values
stream
A stream.
Description

The function set-console-external-format sets the external format of the console on non-Windows platforms to external-format. The stream that *terminal-io* is bound to is changed to have this external format, so if external-format is different from the existing one, then *terminal-io* is set to a stream with this external format.

external-format must be a name of a defined external format (see 26.6 External Formats to translate Lisp characters from/to external encodings). external-format must be a "8-bit byte" format, so its "foreign-type" (which you can check by calling ef:external-format-foreign-type) must be (unsigned-byte 8). In LispWorks 8.0, that includes all the external formats except those related to :utf-32 and those listed in 26.6.2 16-bit External formats guide.

If the value of any of the LispWorks background stream variables (*background-input*, *background-output* and *background-query-io*) is the same as the value of *terminal-io* before the call to set-console-external-format, then set-console-external-format sets this variable to the new value of *terminal-io*.

The result stream is the new value of *terminal-io* (which may be the also the old value if the external format has not changed).

Notes

On startup on non-Windows platforms, LispWorks tries to determine the appropriate external format to use for the console. See 27.16 The console external format for more details. In most of the cases it is better to rely on what LispWorks has determined, because it matches what other software does.

set-console-external-format does nothing on Windows.

See also

26.6 External Formats to translate Lisp characters from/to external encodings
*terminal-io*
*background-input*


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:35