ascii.1 - 9base - revived minimalist port of Plan 9 userland to Unix | |
git clone git://git.suckless.org/9base | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
ascii.1 (2727B) | |
--- | |
1 .TH ASCII 1 | |
2 .SH NAME | |
3 ascii, unicode \- interpret ASCII, Unicode characters | |
4 .SH SYNOPSIS | |
5 .B ascii | |
6 [ | |
7 .B -8 | |
8 ] | |
9 [ | |
10 .BI -oxdb n | |
11 ] | |
12 [ | |
13 .B -nct | |
14 ] | |
15 [ | |
16 .I text | |
17 ] | |
18 .PP | |
19 .B unicode | |
20 [ | |
21 .B -nt | |
22 ] | |
23 .IB hexmin - hexmax | |
24 .PP | |
25 .B unicode | |
26 [ | |
27 .B -t | |
28 ] | |
29 .I hex | |
30 [ | |
31 \&... | |
32 ] | |
33 .PP | |
34 .B unicode | |
35 [ | |
36 .B -n | |
37 ] | |
38 .I characters | |
39 .PP | |
40 .B look | |
41 .I hex | |
42 .B \*9/lib/unicode | |
43 .SH DESCRIPTION | |
44 .I Ascii | |
45 prints the | |
46 .SM ASCII | |
47 values corresponding to characters and | |
48 .I vice | |
49 .IR versa ; | |
50 under the | |
51 .B -8 | |
52 option, the | |
53 .SM ISO | |
54 Latin-1 extensions (codes 0200-0377) are included. | |
55 The values are interpreted in a settable numeric base; | |
56 .B -o | |
57 specifies octal, | |
58 .B -d | |
59 decimal, | |
60 .B -x | |
61 hexadecimal (the default), and | |
62 .BI -b n | |
63 base | |
64 .IR n . | |
65 .PP | |
66 With no arguments, | |
67 .I ascii | |
68 prints a table of the character set in the specified base. | |
69 Characters of | |
70 .I text | |
71 are converted to their | |
72 .SM ASCII | |
73 values, one per line. If, however, the first | |
74 .I text | |
75 argument is a valid number in the specified base, conversion | |
76 goes the opposite way. | |
77 Control characters are printed as two- or three-character mnemonics. | |
78 Other options are: | |
79 .TP | |
80 .B -n | |
81 Force numeric output. | |
82 .TP | |
83 .B -c | |
84 Force character output. | |
85 .TP | |
86 .B -t | |
87 Convert from numbers to running text; do not interpret | |
88 control characters or insert newlines. | |
89 .PP | |
90 .I Unicode | |
91 is similar; it converts between | |
92 .SM UTF | |
93 and character values from the Unicode Standard (see | |
94 .IR utf (7)). | |
95 If given a range of hexadecimal numbers, | |
96 .I unicode | |
97 prints a table of the specified Unicode characters \(em their values and | |
98 .SM UTF | |
99 representations. | |
100 Otherwise it translates from | |
101 .SM UTF | |
102 to numeric value or vice versa, | |
103 depending on the appearance of the supplied text; | |
104 the | |
105 .B -n | |
106 option forces numeric output to avoid ambiguity with numeric characters. | |
107 If converting to | |
108 .SM UTF , | |
109 the characters are printed one per line unless the | |
110 .B -t | |
111 flag is set, in which case the output is a single string | |
112 containing only the specified characters. | |
113 Unlike | |
114 .IR ascii , | |
115 .I unicode | |
116 treats no characters specially. | |
117 .PP | |
118 The output of | |
119 .I ascii | |
120 and | |
121 .I unicode | |
122 may be unhelpful if the characters printed are not available in the curr… | |
123 .PP | |
124 The file | |
125 .B \*9/lib/unicode | |
126 contains a | |
127 table of characters and descriptions, sorted in hexadecimal order, | |
128 suitable for | |
129 .IR look (1) | |
130 on the lower case | |
131 .I hex | |
132 values of characters. | |
133 .SH EXAMPLES | |
134 .TP | |
135 .B "ascii -d" | |
136 Print the | |
137 .SM ASCII | |
138 table base 10. | |
139 .TP | |
140 .B "unicode p" | |
141 Print the hex value of `p'. | |
142 .TP | |
143 .B "unicode 2200-22f1" | |
144 Print a table of miscellaneous mathematical symbols. | |
145 .TP | |
146 .B "look 039 \*9/lib/unicode" | |
147 See the start of the Greek alphabet's encoding in the Unicode Standard. | |
148 .SH FILES | |
149 .TP | |
150 .B \*9/lib/unicode | |
151 table of characters and descriptions. | |
152 .SH SOURCE | |
153 .B \*9/src/cmd/ascii.c | |
154 .br | |
155 .B \*9/src/cmd/unicode.c | |
156 .SH "SEE ALSO" | |
157 .IR look (1), | |
158 .IR tcs (1), | |
159 .IR utf (7), | |
160 .IR font (7) |