2

Sorry for not providing a Minimal Working/Demonstrating Example.
The question is not about code but about understanding what is written in the TeXbook.


TeXbook, Appendix C: Character Codes presents three tables.

The first table shows the (unextended) ASCII (which provides code-points in range from 0(dec) to 127(dec) and bijectively maps specific characters to these code-points -- the resulting set of mappings represents the specific by which ASCII is defined).

The second table shows how to access all characters of (unextended) ASCII using only the ninety-five characters that usually were typeable on the terminals/keyboards in use in the IT-era when the TeXbook was written.
As TeX's ^^-notation requires only a strict subset of the ninety-five typeable standard characters, that second table shows how to access via ^^-notation the thirty-three characters of (unextended) ASCII located in the ASCII-code-points 0(dec) to 31(dec) and 127(dec) which you could probably not type on a terminal/keyboard in use in the time when the TeXbook was written and which with most nowadays' keyboards you still cannot type.

But I don't have a clue what the third table shows:

It deviates from (unextended) ASCII but like with (unextended) ASCII the range of code-points provided is from 0(dec) to 127(dec).

Wikipedia etc tell that "extended ASCII" provides code-points in range from 0(dec) to 255(dec).

Nonetheless the paragraph of the TeXbook which introduces that third table refers to

  • some character-encoding-scheme "which was developed at MIT and which is slightly better than" something "developed at Stanford",
  • an "extended ASCII code intended for text editing and interactive computing" which "was developed at several universities about 1965".

That paragraph also is about the fact that

  • "for many years there have been terminals in use at Stanford, MIT, Carnegie-Mellon, and elsewhere that have 120 or 121 symbols, not just 95."

Request 1:

Can somebody please bring order to confusion/chaos and explain precisely the way in which (unextended) ASCII and extended ASCII and the mentioned terminals that have 120 or 121 symbols, not just 95 correlate with that third table which deviates from (unextended) ASCII but like ASCII provides code-points only in range from 0(dec) to 127(dec).

Question 1:

In TeXbook, Appendix C you find the phrase "extended ASCII code".
If you spell out the acronym, you get:
"extended American Standard Code for Information Interchange code".
That's weird and confusing. Isn't "extended ASCII" sufficient as the "C" in "ASCII" stands for "Code"?

6
  • 2
    It is not clear what you find confusing? Basically it is just showing a keyboard layout and encoding where (for example) control-T is a forall-symbol. Nov 19, 2021 at 19:32
  • Seems Knuth suggests TeX's internal character-representation-scheme to deviate from ascii in case the computer-system/terminal in use allows convenient typing on keyboard and displaying on screen (e.g. via \message) of symbols not covered by (unextended) ascii. And he indicates that this may decrease interchangeability of TeX-code between different computers and suggests designers of TeX macro packages that are intended to be widely used to stick to the standard ascii characters. Nov 19, 2021 at 20:04
  • 1
    When the TeXbook was being written, 8 bit character sets were at their beginnings. Knuth describes the 7 bit character set in use at his institution. Nothing really important nowadays.
    – egreg
    Nov 19, 2021 at 22:23
  • 4
    The keyboards in use at the Stanford AI Lab had an additional shift level. That permitted extra characters to be input directly. For example, the symbol named \otimes was, as I remember, somewhere near the "O" or "P" and accessed with the "supershift". It was colloquially referred to as "splat", and was used in TeX78 as the "tab" marker in tables, which is now (in TeX82) indicated by the ampersand "&". Nov 20, 2021 at 0:42
  • 4
    Here's a photo of the SAIL keyboard: xahlee.info/kbd/sail_keyboard.html The "splat" was even farther up and to the right than I remember -- all the way at the top, next to "delete". But the photo misses the most memorable feature: the green screen of the monitor. Nov 20, 2021 at 0:52

1 Answer 1

1

Not to leave the question unanswered:

The comment of Ulrich Diez is:

Seems Knuth suggests TeX's internal character-representation-scheme to deviate from ascii in case the computer-system/terminal in use allows convenient typing on keyboard and displaying on screen (e.g. via \message) of symbols not covered by (unextended) ascii. And he indicates that this may decrease interchangeability of TeX-code between different computers and suggests designers of TeX macro packages that are intended to be widely used to stick to the standard ascii characters.

The comment of egreg is:

When the TeXbook was being written, 8 bit character sets were at their beginnings. Knuth describes the 7 bit character set in use at his institution. Nothing really important nowadays.

So it seems the term "extended ASCII code" in the TeXbook does not refer to the thing to which the term "extended ASCII code" does refer nowadays.
In the TeXbook the term "extended ASCII code" does not refer to 8-bit encodings providing 256 code-points instead of just 128 but does refer to a 7 bit encoding deviating from (unextended) ASCII, which the author of the TeXbook took for useful in case of having a terminal/keyboard where more than the usual 95 typeable characters were typeable.

The third table shows this encoding = this set of mappings between characters and code-point numbers.


If I got this right, a few sub-questions arise and I would be glad if another answer or comment could take these up, too:

  1. If I got it right, font-encoding maps input-characters to glyphs. Doesn't changing TeX's internal character-encoding scheme imply the need of adapting all font-encodings in use?

  2. Changing TeX's internal character-encoding scheme - doesn't this imply the need of adapting TeX's routines for writing things to file/screen so that it is ensured that ^^-notation is used for displaying characters which the terminal in use cannot not display?

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .