Back in the ancient mists of time when high-resolution graphics were rare and expensive and standard computer character sets were often restricted to seven bits, the IBM PC had a number of box-drawing characters in the upper-half of its 8-bit character set. Nowadays this particular mapping of 8-bit values to characters is known as Code page 437 or CP437 for short.

Since I sometimes used these characters for drawing simple tables, I made myself a little chart of them which is still hanging on the wall of my office. Recently I started looking into reproducing the same chart, but using the equivalent Unicode characters instead. Luckily this is possible because all of the CP437 characters have Unicode equivalents. The same is not true of some other earlier character sets, such as PETSCII which I have also worked with.

Before I present the chart, here’s the various codes and representations of the box-drawing characters. They’ve all been grouped together into the %isobox; group of character entities with the official public name of:

 ISO 8879:1986//ENTITIES Box and Line Drawing//EN

These occupy the code points from 2500 to 256C (hexadecimal) or 9472 to 9580 (decimal). If the Image column (which holds a .gif of the character) doesn’t match the actual character shown in the Chr column, then your browser and/or operating system has issues with this particular part of Unicode and you won’t get much further with this until they’re fixed.

NameImageChrHexDecLong Name
boxh──Box drawings light horizontal
boxv││Box drawings light vertical
boxdr┌┌Box drawings light down and right
boxdl┐┐Box drawings light down and left
boxur└└Box drawings light up and right
boxul┘┘Box drawings light up and left
boxvr├├Box drawings light vertical and right
boxvl┤┤Box drawings light vertical and left
boxhd┬┬Box drawings light down and horizontal
boxhu┴┴Box drawings light up and horizontal
boxvh┼┼Box drawings light vertical and horizontal
boxH══Box drawings double horizontal
boxV║║Box drawings double vertical
boxdR╒╒Box drawings down single and right double
boxDr╓╓Box drawings down double and right single
boxDR╔╔Box drawings double down and right
boxdL╕╕Box drawings down single and left double
boxDl╖╖Box drawings down double and left single
boxDL╗╗Box drawings double down and left
boxuR╘╘Box drawings up single and right double
boxUr╙╙Box drawings up double and right single
boxUR╚╚Box drawings double up and right
boxuL╛╛Box drawings up single and left double
boxUl╜╜Box drawings up double and left single
boxUL╝╝Box drawings double up and left
boxvR╞╞Box drawings vertical single and right double
boxVr╟╟Box drawings vertical double and right single
boxVR╠╠Box drawings double vertical and right
boxvL╡╡Box drawings vertical single and left double
boxVl╢╢Box drawings vertical double and left single
boxVL╣╣Box drawings double vertical and left
boxHd╤╤Box drawings down single and horizontal double
boxhD╥╥Box drawings down double and horizontal single
boxHD╦╦Box drawings double down and horizontal
boxHu╧╧Box drawings up single and horizontal double
boxhU╨╨Box drawings up double and horizontal single
boxHU╩╩Box drawings double up and horizontal
boxvH╪╪Box drawings vertical single and horizontal double
boxVh╫╫Box drawings vertical double and horizontal single
boxVH╬╬Box drawings double vertical and horizontal

In case you’re wondering, yes there are code points missing in the above table. I only bothered with the ones from CP437. If you really want the full list it can be found on the Unicode website.

And now we have my little chart. Note that while the table above was created with the usual mix of HTML table commands, the one below was built from the box-drawing characters listed above. Each character has its code placed under it, and I find the whole thing much easier to read than tables like that above.

Since the first 2 digits of all of the hex codes are the same (25) and the first digit of the decimal codes are all the same (9), they’ve been left out of the chart for conciseness. The hexadecimal code points are represented as xNN where the NN are the last two digits of hex code point. Thus x1C represents the character code ├ (├). In a similar way the NNN triples represent the last three digits of the decimal code point. Thus 500 represents the decimal code of ├ (├) which you’ll note is the same character as before.

If you’re reading this in Internet Explorer, you’ll notice that the following table is messed up. That’s because, for reasons I can’t explain, the monospace spaces that IE renders, aren’t the correct width. If you use a modern browser, like Firefox, everything looks correct.

╔═══════════════════════════╗ ║ Hex:&#x25--; Dec:&#9---; ║ ╠═══╤═══════════╤═══════════╣ ║ │ ─ │ ═ ║ ║ │ x00 │ x50 ║ ║ │ 472 │ 552 ║ ╟───┼───────────┼───────────╢ ║ │ ┌ ┬ ┐ │ ╒ ╤ ╕ ║ ║ │x0C x2C x10│x52 x64 x55║ ║ │484 516 488│554 572 557║ ║ │ │ ║ ║ │ │ ├ ┼ ┤ │ ╞ ╪ ╡ ║ ║x02│x1C x3C x24│x5E x6A x61║ ║474│500 532 508│566 578 569║ ║ │ │ ║ ║ │ └ ┴ ┘ │ ╘ ╧ ╛ ║ ║ │x14 x34 x18│x58 x67 x5B║ ║ │492 524 496│560 575 563║ ╟───┼───────────┼───────────╢ ║ │ ╓ ╥ ╖ │ ╔ ╦ ╗ ║ ║ │x53 x65 x56│x54 x66 x57║ ║ │555 573 558│556 574 559║ ║ │ │ ║ ║ ║ │ ╟ ╫ ╢ │ ╠ ╬ ╣ ║ ║x51│x5F x6B x62│x60 x6C x63║ ║553│567 579 570│568 580 571║ ║ │ │ ║ ║ │ ╙ ╨ ╜ │ ╚ ╩ ╝ ║ ║ │x59 x68 x5C│x5A x69 x5D║ ║ │561 576 564│562 577 565║ ╚═══╧═══════════╧═══════════╝