All Manuals > LispWorks User Guide and Reference Manual > 22 Internationalization

NextPrevUpTopContentsIndex

22.5 External Formats

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:

win32:code-page

The Windows code page with identifier given by the :id parameter. Implemented only on Windows.

:latin-1

ISO8859-1.

:latin-1-terminal

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.

:latin-1-safe

As Latin-1, except that if a non-Latin-1 character is output, it is written as ? and does not signal error.

:macos-roman

The Mac OS Roman encoding.

:ascii

ASCII.

:unicode

The UCS-2 encoding of Unicode. The parameter :little-endian defaults to the endianness of the platform.

:utf-8

The UTF-8 encoding of Unicode.

:jis

JIS. The encoding data is read from a file Uni2JIS and is pre-built into LispWorks.

:euc-jp

EUC-JP. The encoding data is read from a file Uni2JIS and is pre-built into LispWorks.

:sjis

Shift JIS.

:windows-cp936

Windows code page 936. The encoding data is read from a file windows-936-2000.ucm and is pre-built into LispWorks.

:gbk

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

NextPrevUpTopContentsIndex