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
|
******* Kto8 DOCUMENTATION *******
OVERVIEW
The "Kto8" program converts the strangely encoded text files
output by D. Knuth's "TeX" program (v 3.x) into true 8-bit
text files.
This is helpful when text files output by TeX are to be edited
visually -- which occurs, for example:
--- when TeX has been called upon to change the encoding of
a text file, and
--- when an index being prepared on the basis of
information gleaned by TeX.
[In the latter role, Kto8 may not be suitable; more precisely it
tends to be suitable only when TeX writes the gleaned words in
an "unexpanded" form, i.e. more-or-less as originally typed.
Alas, a few older TeX formats may fail to do this.]
Be aware that many implementations of TeX do write 8-bit
text files, and thus have little use for Kto8. In a text file
output by TeX, the sign of need for conversion by Kto8 is the
presence of pairs ^^ of hat characters. If there are no such
pairs, Kto8 will merely copy the file intact.
Kto8 is a small freeware program that was first realized
for Macintosh as a tiny 16Ko drag-and-drop utility. Hopefully
equally convenient binaries will become available also for
Windows, and some linux, and unix platforms.
ENCODING DETAILS
Knuth's original Web version of the current TeX program, by
default, writes all text files in a peculiar ASCII encoding.
The ASCII characters 32--126 are roughly those that appear on
every typewriter or computer keyboard.
These 'normal' ASCII characters appear unaltered. All other
octets 0--255 are represented by a sequence of 3 or 4 normal
ASCII characters beginning with the pair ^^. More precisely:
(i) the octets 0,1,2,...,24,25,26,27,28,29,30,31 are
represented by the 32 triples:
^^@, ^^A, ^^B, ... ^^Y, ^^Z, ^^[, ^^\, ^^], ^^^, ^^_
(ii) the octets 128, 129, ... , 254, 255 are represented by
the quadruples consisting of ^^ followed by the lowercase
2-digit hexadecimal representation of the integer:
^^80, ^^81, ... , ^^fe, ^^ff
(ii) The remaining octet 127 is represented as ^^?. (Some
TeX implementations use ^^7f for greater clarity.)
This Knuthian encoding of 8-bit text files is unambiguous
only because (or if!) the 8-bit text encoded is known to
contain none of the triples and quadruples above.
Beware that TeX implementations claiming to write 8-bit
text satisfactorily may use the Knuthian encoding for several
characters deemed to be troublesome. Thus, even a progressive
TeX implementation may occasionally need Kto8!
BUGS
Please report bugs by email to:
lcs@topo.math.u-psud.fr
or
laurent@math.toronto.edu
|