CODEPAGE - ALT (numeric keypad)


[ Follow Ups ] [ Post Followup ] [ Previous # Next ] [ Start New Thread ] [ TarBoard ]

Posted by Ed Kiser on April 13, 2005 at 18:03:57 from 205.188.116.6 user Kisered.

In Reply to: Re: Copyright, AR's will, Rattletrap posted by John Wilson on April 13, 2005 at 06:13:25:

We have seen how there are different definitions of certain characters. In one reference, we see that ALT - 0233 produces the E ACUTE character, and in another listing is presented the definition of ALT - 130 as being the code to produce the same character.

The difference has to do with which CODEPAGE is being the current defined character set.

The ALT - 130 definition is the older one, the definitions that were defined at the very beginning of DOS. Those of you that have QBASIC, if you look at its HELP reference, under CONTENTS, under ASCII CHARACTER CODES, you will see the original definition. This set shows that ALT -130 does produce the E ACUTE.

If you make an ASCII TEXT FILE using the EDIT command from the DOS COMMAND LINE, it uses this older codepage set of definitions. However, NOTEPAD does not use this definition, so any file produced under EDIT when looked at with NOTEPAD, will show those characters above 0127 to be quite different, thus showing what appears to be garbage. The reverse is also true in that a file produced by NOTEPAD, that uses the ALT - 0233 definition of E ACUTE, is then displayed by EDIT, there is the mistranslation of those characters and we see that "this is another fine mess you have gotten me into." (Quote from Mr. Hardy of the Laurel and Hardy comedy team of some 70 years ago.)

The purpose of providing several CODEPAGE definitions is to enlarge the "vocabulary" that the 000-255 numeric set for one byte of storage can represent. In this manner, one can type in KATAKANA (Japanese), in the Russian Crylic, in Greek, in Hebrew (and many others). Just don't take a file intended for one codepage and display it using some other codepage, as the result is garbage.

Being an old DOS BIGOT from the original days of the IBM PC development team, I am apt to try to use the original codepage definitions, as shown by QBASIC, where ALT - 130 is the E ACUTE. When I typed in these twelve Ransome stories, EDIT was used, and thus this older codepage was the assumed definition. In those places where our character friends are doing holiday tasks (Titty in SD) and are practicing French, the characters there, if shown in NOTEPAD, will come out wrong, since I used the original CODEPAGE in EDIT.

If I try to read my ASCII TEXT files (from EDIT) using MS-WORD, it will come up with an options window specifying FILE CONVERSIONS. To make my EDIT stuff work under WORD, I select the "MS-DOS" text encoding, and that will select that old CODEPAGE so everything looks good. In that option window, you can see there is quite an assortment of encodings available. Each of these is defined in its own CODEPAGE, although the word "CODEPAGE" is not used by this option window. But that is what you are selecting there.

So when using that ALT-(numeric keypad) method of typing in rare characters, it is important to know which codepage is being referenced. Try the ALT-130 and the ALT - 0233 entries and see which one produces the E ACUTE.

For reference, go to the DOS COMMAND LINE PROMPT and enter: MODE /?

It will show the parameters accepted by MODE. Among them you will see the ability to define which CODEPAGE is desired for display on the console. What seems to be missing from this "HELP" is the numeric "names" of the various codepages that are to be entered on the CODEPAGE selection parameter.

If you type in MODE CON /STATUS, you will see there the display that includes the NUMBER of the Current CODEPAGE definition. Fromt the DOS COMMAND LINE PROMPT, it will show that "437" is the number of that current CODEPAGE. That is the same as defined by the QBASIC help, where ALT-130 is the E ACUTE.

As if I did not have enough problems with my AMERICAN spell checker throwing up on those Ransome spellings of HARBOUR. Too bad we can't all do things the same way. It sure would simplify the programming profession.

So much for techy talk...

Ed Kiser, South Florida


Follow Ups:



Post a Followup

Name:
Eel-Mail:

Existing subject (please edit appropriately) :

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

post direct to TarBoard test post first

Before posting it is necessary to be a registered user.


[ Follow Ups ] [ Post Followup ] [ TarBoard ]

Courtesy of Environmental Science, Lancaster

space