Skip to content
Snippets Groups Projects
Commit 7a220e78 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

CP437 0x7C is UNICODE_BROKEN_BAR (U+00A6)

Contrary to pouplar belief CP437 does not encode US-ASCII.
US-ASCII has UNICODE_VERTICAL_LINE (U+007C) there (which does match
Unicode)

Aren't you glad your C compiler didn't use CP437?
if (x ??!??! y) is so much uglier than if (x || y)

Of course, with C99 (or C90 with the 1995 ammendment), we would have
seen a lot of iso646.h and the use of the or, bitor, and or_eq macros,
and maybe that would have gotten that whole list of 11 macros promoted
to keywords eventually (Likely in C23) since it's hard to eat just one
peanut.

Of course, that's all alternate history... it's unlikely that any
compiler vendor would actually care, and | and ¦ (or | and ³ for those
using CP437) would be "the same".
parent 7a0ec199
No related branches found
No related tags found
No related merge requests found
Pipeline #8341 passed
......@@ -23,7 +23,7 @@
#include "cp437defs.h"
#include "unicode_defs.h"
// Want UNICDE encodings of terminal control characters?
// Want UNICODE encodings of terminal control characters?
#if defined USE_UNICODE_FOR_TERM_CTRL_CHARS
# define UNICODE_TERM_CTRL_CHAR_CODE(x) x
#else
......@@ -67,8 +67,7 @@ enum unicode_codepoint cp437_unicode_tbl[] =
/* 0x1D */ UNICODE_LEFT_RIGHT_ARROW,
/* 0x1E */ UNICODE_BLACK_UP_POINTING_TRIANGLE,
/* 0x1F */ UNICODE_BLACK_DOWN_POINTING_TRIANGLE,
/* 0x20-0x7E (1:1 with US-ASCII and CP437) */
0,
/* 0x20-0x7C (1:1 with US-ASCII and CP437) */
0,
0,
0,
......@@ -161,6 +160,8 @@ enum unicode_codepoint cp437_unicode_tbl[] =
0,
0,
0,
/* 0x7C */ UNICODE_BROKEN_BAR,
/* 0x7D-0x7E (1:1 with US-ASCII and CP437) */
0,
0,
/* 0x7F (DEL) */ UNICODE_TERM_CTRL_CHAR_CODE(UNICODE_HOUSE),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment