External formats are two-way translations from Lisp's internal encoding to an external encoding. They can be used in file I/O, and in passing and receiving string data in foreign function calls.
An external format is named in LispWorks by an external format specification (ef-spec). An ef-spec is a symbol naming the external format, or a list with such a name as its first element followed by parameter/value pairs.
LispWorks has a number of predefined external formats:
The Windows code page with identifier given by the
:id
parameter.
Implemented only on Windows.
As Latin-1, except that if a non-Latin-1 character is output, it is written as
<xxxx>
where
xxxx
is the hexdecimal character code and does not signal error.
As Latin-1, except that if a non-Latin-1 character is output, it is written as
?
and does not signal error.
The UCS-2 encoding of Unicode. The parameter
:little-endian
defaults to the endianness of the platform.
The UTF-8 encoding of Unicode.
JIS. The encoding data is read from a file
Uni2JIS
and is pre-built into LispWorks.
EUC-JP. The encoding data is read from a file
Uni2JIS
and is pre-built into LispWorks.
Windows code page 936. The encoding data is read from a file
windows-936-2000.ucm
and is pre-built into LispWorks.
A synonym for
:windows-cp936
.
Note:
windows-936-2000.ucm
is provided by way of documentation in the directory
lib/6-1-0-0/etc/
. It is not read at runtime.
Note:
Uni2JIS
is provided by way of documentation in the directory
lib/6-1-0-0/etc/
. It is also used at runtime by the function
char-name
.
LispWorks User Guide and Reference Manual - 21 Dec 2011