Disk names, file names and the text in SEQ files are PETSCII, the Commodore character set, not ASCII. A disk does not say how its text was meant to be shown, so the explorer’s options bar has a Character set choice, and this page says exactly what each choice does.
The two character sets
The C64 has two screen character sets and switches between them with Shift and the Commodore key. The same byte shows differently in each:
| Codes | Uppercase and graphics (the power-on set) | Lowercase and uppercase |
|---|---|---|
20–3F | As ASCII: space, digits and punctuation | |
40 | @ | |
41–5A | Capital letters A to Z | Small letters a to z |
5B, 5D | [ and ] | |
5C, 5E, 5F | £, an up arrow ↑ and a left arrow ← | |
61–7A and C1–DA | Graphics characters | Capital letters A to Z |
A0 | Shifted space: the padding of names | |
E0–FE, C0–DF | Repeat A0–BE and 60–7F | |
00–1F, 80–9F | Control codes: colours, cursor keys, reverse on and off, clear screen, return (0D, 8D) | |
How the explorer maps them to Unicode
- Letters, digits, punctuation,
@,[,], £, ↑, ← and the shifted space follow the table above. - Of the graphics characters only those with a plain Unicode equivalent are mapped (the codes are those of the uppercase-and-graphics set):
60/63─,62│,7B┼, the four suits61♠,73♥,7A♦ and78♣, the circles71● and77○, the rounded corners75╭,69╮,6A╰ and6B╯, the diagonals6E╱,6D╲ and76╳, and7Eπ. These are the closest plain characters, not an exact copy of the C64’s glyphs: the C64 has several distinct horizontal lines, for instance, and the mapping uses one. - Every other graphics character becomes U+FFFD, the replacement character. (Unicode’s Symbols for Legacy Computing block has more of them; it is not used, because few fonts have it.)
- In a name, the text ends at the first
A0, and a control code becomes U+FFFD. - In a SEQ file, return (
0D, and8D, Shift-return) ends a line; every other control code is left out and counted (the viewer’s Text conversion table gives the count and the number of U+FFFD for each file). Reverse-video and colour codes therefore leave no trace in the text.
Limits
- Nothing in a disk says which character set a name or file expects. The choice is the viewer’s, and the same bytes read as different letters in the other set.
- Text that came from another system and was copied to a disk byte for byte is ASCII, not PETSCII: its small letters (
61–7A) show as graphics in the uppercase set and as capitals in the lowercase one, and its line ends (0Aor0D 0A) are not converted. The viewer opens the raw bytes of a SEQ file as well, from the Text conversion table. - The mapping of the graphics characters is partial, as above; the unmapped ones are not identified individually.
- GEOS files use ASCII, not PETSCII, for the text in their INFO blocks (see GEOS directory entries); the viewer does not convert it.
- The other Commodore machines (VIC-20, PET, C128, Plus/4) have character sets that differ from the C64’s in places. The viewer treats every disk as a C64 disk.