Diff of /ansi_characters.xml [000000] .. [bbf6a2] Maximize Restore

  Switch to unified view

a b/ansi_characters.xml
1
<?xml version="1.0" encoding="utf-8"?>
2
<!DOCTYPE book [
3
<!ENTITY % eclent SYSTEM "ecl.ent">
4
%eclent;
5
]>
6
<book xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
7
<chapter xml:id="ansi.characters">
8
 <title>Characters</title>
9
 <para>&ECL; is fully ANSI Common-Lisp compliant in all aspects of the character
10
 data type, with the following peculiarities.</para>
11
12
 <section xml:id="ansi.character-types">
13
  <title>Character types</title>
14
15
  <para>If compiled without Unicode support, &ECL; all characters are
16
  implemented using 8-bit codes and the type <type>extended-char</type>
17
  is empty. If compiled with Unicode support, characters are implemented
18
  using 24 bits and the <type>extended-char</type> type covers characters above
19
  code 255.</para>
20
  <informaltable>
21
   <tgroup cols="3">
22
    <thead>
23
     <row>
24
      <entry>Type</entry>
25
      <entry>With Unicode</entry>
26
      <entry>Without Unicode</entry>
27
     </row>
28
    </thead>
29
    <tbody>
30
     <row>
31
      <entry><type>standard-char</type></entry>
32
      <entry>#\Newline,32-126</entry>
33
      <entry>#\Newline,32-126</entry>
34
     </row>
35
     <row>
36
      <entry><type>base-char</type></entry>
37
      <entry>0-255</entry>
38
      <entry>0-255</entry>
39
     </row>
40
     <row>
41
      <entry><type>extended-char</type></entry>
42
      <entry>-</entry>
43
      <entry>255-16777215</entry>
44
     </row>
45
    </tbody>
46
   </tgroup>
47
  </informaltable>
48
 </section>
49
50
 <section xml:id="ansi.character-names">
51
  <title>Character names</title>
52
53
  <para>All characters have a name. For non-printing characters between 0 and 32, and for 127 we use the ordinary <acronym>ASCII</acronym> names. Characters above 127 are printed and read using hexadecimal Unicode notation, with a <literal>U</literal> followed by 24 bit hexadecimal number, as in <literal>U0126</literal>.</para>
54
  <table xml:id="table.character-names">
55
   <title>Examples of character names</title>
56
   <tgroup cols="2">
57
    <thead>
58
     <row>
59
      <entry>Character</entry>
60
      <entry>Code</entry>
61
     </row>
62
    </thead>
63
    <tbody>
64
     <row><entry><literal>#\Null</literal></entry><entry>0</entry></row>
65
     <row><entry><literal>#\Ack</literal></entry><entry>1</entry></row>
66
     <row><entry><literal>#\Bell</literal></entry><entry>7</entry></row>
67
     <row><entry><literal>#\Backspace</literal></entry><entry>8</entry></row>
68
     <row><entry><literal>#\Tab</literal></entry><entry>9</entry></row>
69
     <row><entry><literal>#\Newline</literal></entry><entry>10</entry></row>
70
     <row><entry><literal>#\Linefeed</literal></entry><entry>10</entry></row>
71
     <row><entry><literal>#\Page</literal></entry><entry>12</entry></row>
72
     <row><entry><literal>#\Esc</literal></entry><entry>27</entry></row>
73
     <row><entry><literal>#\Escape</literal></entry><entry>27</entry></row>
74
     <row><entry><literal>#\Space</literal></entry><entry>32</entry></row>
75
     <row><entry><literal>#\Rubout</literal></entry><entry>127</entry></row>
76
     <row><entry><literal>#\U0080</literal></entry><entry>128</entry></row>
77
    </tbody>
78
   </tgroup>
79
  </table>
80
  <para>Note that <literal>#\Linefeed</literal> is synonymous with
81
  <literal>#\Newline</literal> and thus is a member of
82
  <type>standard-char</type>.</para>
83
 </section>
84
85
 <section>
86
  <title>Line Divisions</title>
87
88
  <para>Internally, &ECL; represents the <literal>#\Newline</literal> character by a single code. However, when using external formats, &ECL; may parse character pairs as a single <literal>#\Newline</literal>, and viceversa, use multiple characters to represent a single <literal>#\Newline</literal>.</para>
89
 </section>
90
91
 <xi:include href="ref_c_characters.xml" xpointer="ansi.characters.c-dict" xmlns:xi="http://www.w3.org/2001/XInclude"/>
92
</chapter>
93
</book>