All Manuals > LispWorks® User Guide and Reference Manual > 27 LispWorks' Operating Environment

27.16 The console external format

Characters read and written via the console (*terminal-io*) are encoded in an external format that is determined by the operating environment.

On Windows, the console uses the default system console code page.

On non-Windows platforms, LispWorks tries to determine the appropriate external format to use for the console. On startup, a "locale name" is determined from the value of the first of the standard POSIX environment variables LC_ALL, LC_CTYPE and LANG (in that order) that is set. If the locale name specifies a "codeset" (which means it contains a dot and the "codeset" is the bit after the dot) that matches a LispWorks external format, then LispWorks uses this external format. If the locale name matches one of languages covered by the ISO-8859-1 character set, then LispWorks uses :latin-1-terminal. If the locale name is C or POSIX, then LispWorks uses :ascii-terminal. Otherwise, LispWorks uses :latin-1-terminal, which outputs non-latin-1 characters (those with code larger than 255) by printing the hex representation of the code in angle brackets.

The function set-console-external-format can be used to override the external format on non-Windows platforms. In most of the cases it is better to rely on what LispWorks has chosen, because it matches what other software does.


LispWorks® User Guide and Reference Manual - 18 Feb 2025 15:32:07