1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
<head>
<title>ascii(1) - Plan 9 from User Space</title>
<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
</head>
<body bgcolor=#ffffff>
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr height=10><td>
<tr><td width=20><td>
<tr><td width=20><td><b>ASCII(1)</b><td align=right><b>ASCII(1)</b>
<tr><td width=20><td colspan=2>
<br>
<p><font size=+1><b>NAME </b></font><br>
<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
ascii, unicode – interpret ASCII, Unicode characters<br>
</table>
<p><font size=+1><b>SYNOPSIS </b></font><br>
<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
<tt><font size=+1>ascii</font></tt> [ <tt><font size=+1>−8</font></tt> ] [ <tt><font size=+1>−oxdb</font></tt><i>n</i> ] [ <tt><font size=+1>−nct</font></tt> ] [ <i>text</i> ]
<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
<tt><font size=+1>unicode</font></tt> [ <tt><font size=+1>−nt</font></tt> ] <i>hexmin</i><tt><font size=+1>−</font></tt><i>hexmax
<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
</i>
<tt><font size=+1>unicode</font></tt> [ <tt><font size=+1>−t</font></tt> ] <i>hex</i> [ ... ]
<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
<tt><font size=+1>unicode</font></tt> [ <tt><font size=+1>−n</font></tt> ] <i>characters
<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
</i>
<tt><font size=+1>look</font></tt> <i>hex</i> <tt><font size=+1>/usr/local/plan9/lib/unicode<br>
</font></tt>
</table>
<p><font size=+1><b>DESCRIPTION </b></font><br>
<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
<i>Ascii</i> prints the ASCII values corresponding to characters and
<i>vice versa</i>; under the <tt><font size=+1>−8</font></tt> option, the ISO Latin-1 extensions (codes
0200-0377) are included. The values are interpreted in a settable
numeric base; <tt><font size=+1>−o</font></tt> specifies octal, <tt><font size=+1>−d</font></tt> decimal, <tt><font size=+1>−x</font></tt> hexadecimal (the
default), and <tt><font size=+1>−b</font></tt><i>n</i> base <i>n</i>.
<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
With no arguments, <i>ascii</i> prints a table of the character set in
the specified base. Characters of <i>text</i> are converted to their
ASCII values, one per line. If, however, the first <i>text</i> argument
is a valid number in the specified base, conversion goes the opposite
way. Control characters are printed as two- or three-character
mnemonics. Other options are:<br>
<tt><font size=+1>−n</font></tt> Force numeric output.<br>
<tt><font size=+1>−c</font></tt> Force character output.<br>
<tt><font size=+1>−t</font></tt> Convert from numbers to running text; do not interpret control
characters or insert newlines.
<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
<i>Unicode</i> is similar; it converts between UTF and character values
from the Unicode Standard (see <a href="../man7/utf.html"><i>utf</i>(7)</a>). If given a range of hexadecimal
numbers, <i>unicode</i> prints a table of the specified Unicode characters
-- their values and UTF representations. Otherwise it translates
from UTF to numeric value or vice versa, depending
on the appearance of the supplied text; the <tt><font size=+1>−n</font></tt> option forces numeric
output to avoid ambiguity with numeric characters. If converting
to UTF , the characters are printed one per line unless the <tt><font size=+1>−t</font></tt>
flag is set, in which case the output is a single string containing
only the specified characters. Unlike <i>ascii</i>, <i>unicode</i> treats
no characters specially.
<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
The output of <i>ascii</i> and <i>unicode</i> may be unhelpful if the characters
printed are not available in the current font.
<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
The file <tt><font size=+1>/usr/local/plan9/lib/unicode</font></tt> contains a table of characters
and descriptions, sorted in hexadecimal order, suitable for <a href="../man1/look.html"><i>look</i>(1)</a>
on the lower case <i>hex</i> values of characters.<br>
</table>
<p><font size=+1><b>EXAMPLES </b></font><br>
<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
<tt><font size=+1>ascii −d<br>
</font></tt>
<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
Print the ASCII table base 10.<br>
</table>
<tt><font size=+1>unicode p<br>
</font></tt>
<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
Print the hex value of ‘p’.<br>
</table>
<tt><font size=+1>unicode 2200−22f1<br>
</font></tt>
<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
Print a table of miscellaneous mathematical symbols.<br>
</table>
<tt><font size=+1>look 039 /usr/local/plan9/lib/unicode<br>
</font></tt>
<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
See the start of the Greek alphabet’s encoding in the Unicode
Standard.<br>
</table>
</table>
<p><font size=+1><b>FILES </b></font><br>
<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
<tt><font size=+1>/usr/local/plan9/lib/unicode<br>
</font></tt>
<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
table of characters and descriptions.<br>
</table>
</table>
<p><font size=+1><b>SOURCE </b></font><br>
<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
<tt><font size=+1>/usr/local/plan9/src/cmd/ascii.c<br>
/usr/local/plan9/src/cmd/unicode.c<br>
</font></tt>
</table>
<p><font size=+1><b>SEE ALSO </b></font><br>
<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
<a href="../man1/look.html"><i>look</i>(1)</a>, <a href="../man1/tcs.html"><i>tcs</i>(1)</a>, <a href="../man7/utf.html"><i>utf</i>(7)</a>, <a href="../man7/font.html"><i>font</i>(7)</a><br>
</table>
<td width=20>
<tr height=20><td>
</table>
<!-- TRAILER -->
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr height=15><td width=10><td><td width=10>
<tr><td><td>
<center>
<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
</center>
</table>
<!-- TRAILER -->
</body></html>
|