Mail Archives: djgpp/1999/09/22/18:05:00
aw AT mail1 DOT bet1 DOT puv DOT fi (aw AT mail1 DOT bet1 DOT puv DOT fi) wrote in
comp.os.msdos.programmer:
>brahms AT mindspring DOT com (Stan Brown) wrote:
>> Ah -- the characters { | } are used for ø æ å (not necessarily in that
>> order) on Danish-Norwegian keyboards. I think country 44 is Norway.
>Really? I always though standard ASCII (characters <=127) was the same
>for all code pages. At least it is for CP 437 and CP 850.
Really. Stroustrup writes about this very point in /The Design and
Evolution of C++/. The C programming language needs the { | } characters,
but Scandinavians had to type ø æ å, which are regular letters to them,
to get the needed ASCII codes. As you may suspect, it made for some
mighty strange-looking programs, so the ANSI C committee came up with
ugly trigraphs to work around the problem. So in C the sequences ??< and
??> can be used instead of the curly braces { }, and ??! for |. (By the
way, | on my keyboard is a broken bar, but on my screen it's unbroken.)
ASCII is an American standard (the A in ASCII). ISO-8859-1 is an
international standard, and in that standard the positions 32-127 do mean
the same thing to all code sets. This is accomplished by moving ø æ å
into the 160-255 range.
By the way, ø æ å (and Swedish ö ä) are actual letters in those
languages, not just an accent on top of another letter like the French é.
But I digress.
--
Stan Brown, Oak Road Systems, Cleveland, Ohio, USA
http://www.mindspring.com/~brahms/
"It's my opinion, and it's very true."
- Raw text -