Alt Codes

Primary tabs

15 posts / 0 new
Last post
Robert Digito's picture
Offline
Joined: 4 Apr 2012 - 8:14am
Alt Codes
0

How come character map doesn't show me alt codes for every glyph? And what's the logic behind the numeration?

Hrant H Papazian's picture
Joined: 3 May 2000 - 11:00am
0

I think those codes are only for ASCII-8 characters. Note that the leading zero is a "trigger", so you really only have 1000 possible codes anyway. But only 0 to 255 are implemented. In fact try Alt-0321: you get "A". Because 321 = 65 (the code for "A") plus 256. So it's just cycling through (like how 370 degrees is the same as 10 degrees).

And logic?! :-)

hhp

Robert Digito's picture
Offline
Joined: 4 Apr 2012 - 8:14am
0

Perfect, thanks for the quick lesson!

Reynir Heiðberg Stefánsson's picture
Joined: 19 Nov 2010 - 11:15am
0

Microsoft. Logic. Choose one.

The initial zero is a trigger allright, but for the incoming strokes to be interpreted as Windows-1252 or Unicode (on later and chromier Windowses) instead of CP437 or whatever your local DOS codepage is.

The zero may not be needed on DOS-less Windows (anything after XP, I think), but I don't know for sure.

Hrant H Papazian's picture
Joined: 3 May 2000 - 11:00am
0

AFAIR doing codes without a leading zero goes to an alternative encoding, like EBCDIC or something.

BTW, I'm pretty sure the ASCII (even -8) arrangement predates Microsoft.

hhp

Reynir Heiðberg Stefánsson's picture
Joined: 19 Nov 2010 - 11:15am
0

Nah... I don't think Microsoft ever did EBCDIC. Too IBMish, even for them. No, I'm sure the Win98 user manual said that without the zero, it went by the DOS code page, and my own checks seem to confirm that with Alt-165 returning Ñ and Alt-224 returning Ó, both proper for code page 850.

Hrant H Papazian's picture
Joined: 3 May 2000 - 11:00am
0

Does that mean it lets you do those cute rules and borders?

hhp

Reynir Heiðberg Stefánsson's picture
Joined: 19 Nov 2010 - 11:15am
0

When I shell out to DOS it does. In Windows I only get ASCII approximations. Guess that's to be expected, since Windows-1252 does not have the borders anyway.

Hrant H Papazian's picture
Joined: 3 May 2000 - 11:00am
0

What if you switch to some sort of console font?

hhp

Theunis de Jong's picture
Offline
Joined: 22 Apr 2008 - 5:06pm
0

Arial Unicode contains and displays these characters, but of course it's a proportional font. Fortunally, Courier New works better:

-- gosh, I even could recall the Alt codes! Ah, those good old memories of creating user interfaces with these.

(BTW This is with InDesign on Windows 7.)

Reynir Heiðberg Stefánsson's picture
Joined: 19 Nov 2010 - 11:15am
0

...our salad days, when we were still green to the world...

@Hrant – Nope, not even when I choose Terminal (an OEM/DOS font) in Notepad. Mind, the zero prefix does the trick, then.

Of course, the Win98 machine has accumulated all sorts of patches and stuff, and I can no longer remember if using the DOS codes worked fully on base Win98.

@Theunis – I recall (re)writing some UI routines in Turbo Pascal, which was of course the other language for the laity after GWBASIC.

Yuck. Never liked Microsoft-style BASICs. But then, I did own a QL.

Hrant H Papazian's picture
Joined: 3 May 2000 - 11:00am
0

Theunis, way cool. We can start the next retro trend with this puppy. :-)

Reynir: Pascal, eh? I used to put up "Dijkstra is a Wimp" flyers at my school. When they tore them down I added a perfectly forged "Approved for posting by the School of Engineering and Computer Science"* stamp. That made 'em last much longer. I defended "goto" like there was no tomorrow; microcode is still only for the fully spined.

* An ironic acronym if there ever was one.

hhp

Theunis de Jong's picture
Offline
Joined: 22 Apr 2008 - 5:06pm
0

Té, have you tried Courier New? Strangely enough, Terminal doesn't work for me either, but CN does it, well, out of the retro-box! I didn't even had to select the OEM Charset first.

Wikipedia on Box Characters shows that Unicode nowadays includes rounded corners to match. And they added a little bit more order to the set ... My bottom line in the image shows codes 179 to 202 (ish), a pretty random order.

It would be cool to see the box set in a modern font -- matching the rest of the font in style, of course!

Hrant H Papazian's picture
Joined: 3 May 2000 - 11:00am
0

Granjon would've had a field day with this.

hhp

Reynir Heiðberg Stefánsson's picture
Joined: 19 Nov 2010 - 11:15am
0

Nope, CN is no help in '98. But since '98 is pre-Unicodification anyway...

Needed to look it up, but the CPC6128 at least had line-drawing characters with rounded corners. Well, as rounded as an 8×8 grid allows.

@hrant – According to later info, it was the editor of the piece, one N. Wirth, that changed the title to "GOTO Considered Harmful". Dijkstra's name was "A Case Against the GO TO Statement".

Turbo Pascal isn't a standard Pascal, but more like a Pascal in dungarees.