:ASCII
external-format, so in this case, only base-string
literals are produced by quoted strings read in the standard
readtable. In other cases, string literals may be of other
string types.
Note that implementations are allowed to copy and perform other optimizations at any time on the names used to intern symbols. Thus the symbol-name of a symbol which is originally created with a name that is a general string may, in fact be treated as a base-string by the system if all the characters of the name are, in fact, of type base-char.
A control character is one which has its control bit set. ASCII control characters are non-graphic, and have char-codes below 32.
An ASCII-char does not have its meta bit set. A Latin-char which is not also an ASCII-char does have its meta bit set. Meta characters have char-codes above 127. N.B.: A meta character that is also a control character may or may not be graphic. (See Character Predicates and Case, below.)
Both the control bit and meta bit attributes are stripped off by char-code. For example,
(char-code x) <=> (char-int (set-char-bit x :control nil :meta nil))
Both the control bit and meta bit attributes are preserved and respected by all other character and string functions, including code-char. They are not ignored by char-equal. Setting these bits are useful for creating characters not easily entered from the keyboard.
#\ syntax
for characters:
The behavior is undefined if the character following the prefix is not a base-char, or it already has the specified bit set.
Examples:
(char= #\bell #\control-g #\CONTROL-G #\^g #\^G) => true (char= #\%g #\meta-g #\Meta-g) => true (char= #\%g #\%G) => nil (char= #\control-meta-g #\%^g) => true (char= #\line-feed #\control-j) => true (char= #\meta-null #\%^@ (code-char (1+ (char-code #\delete)))) => true
setlocale(LC_CTYPE, "") at
start-up. Some operating systems do not do the right thing for
Unicode characters which are not Latin.
Note that the Common Lisp string comparison functions (such as string-lessp) are defined to work character by character. This means that local collating conventions for text strings are not followed. However, the sense of case for each character is as for the character predicates.
:ASCII - This format will only work with streams of
element-type base-char. Characters are
represented outside Eclipse in the usual 8 bit ASCII format.
:UCS - This format will work with streams of
element-type Unicode-char. Characters are
represented outside Eclipse as two or four octet Unicode characters -
i.e. as UCS-2 or UCS-4 format. UCS-2 format is used when
element-type is subtype of UCS-2-char, otherwise
UCS-4 is used.
:MULTI-BYTE - In principle, this format will work
with streams of element-type Unicode-char. Characters
are represented outside Eclipse as operating system specific
multi-byte character strings. Character codes within Eclipse
are treated as operating system specific wide character
strings. The conversion between multi-byte and wide
character strings is performed as though by the operating system's
wcstombs() and mbstowcs() utilities.
These utilities are intended to implement the Unicode UTF-8 format (a
descendent of the FSS-UTF), which is supposed to work on all 4-octet
Unicode characters (i.e. UCS-4). However, on many platforms, only
2-octet Unicode characters (i.e. UCS-2) are handled properly.
Therefore, :MULTI-BYTE format can only reliably be used
with streams of element-type UCS-2-char.
:ASCII
external-format stream, the correct ISO8859-1 glyph will be
displayed only if the operating system supports ISO8859-1 for that
stream.