HACKER Q&A
📣 jbverschoor

Wrong Pipe Character?


Everybody knows the pipe character |, or at least everybody here should know.

It popped my mind that in the past I recall it was rendered as a two small pipes / a stretched colon.

When I was young I had an MSX, and my memory was right, ascii character 0x7C / 124 looks different. See https://www.msx.org/wiki/images/6/66/MSX_font-Int.png

Looking further, on https://www.ascii-code.com/ ,I can see that 124 / 0x7C is the "vertical bar". And 166 / 0xA6 is "Pipe, Broken vertical bar"

It seems we're not using a pipe.. Does anybody happen to know why?


  👤 JDW1023 Accepted Answer ✓
I remembered watching a youtube video[0] about it. The "vertical bar" 124 / 0x7C is in the original 7-bit ASCII standard. But the 166 / 0xA6 "Pipe, Broken vertical bar" is in the not so standard high ASCII/ Extended ASCII [1].

[0]: https://www.youtube.com/watch?v=BktIY7VbrUs [1]:https://en.wikipedia.org/wiki/Extended_ASCII



👤 zzo38computer
The ASCII character | is a solid bar, although some older fonts, such as the PC font, will have it displayed broken in half. If you are working only in ASCII, they are two representations of the same thing, but if you are working in extended character sets, they are different, and only the solid one is the ASCII one. Many keyboard layouts are ASCII only, and show the broken bar (I suppose this might confuse people who are unaware of it if they are not working with only ASCII, but anyways people have also asked where is the lowercase, before, so both of them can be confused by some people).


👤 alricb
Something about old standards and IBM: https://www.youtube.com/watch?v=BktIY7VbrUs

👤 cstuder
Funny, my keyboard (Microsoft Sculpt) actually has the broken bar printed on the key `7`.

Both the ThinkPad P53 keyboard and the Logitech K850 have the solid bar printed on the key.



👤 sebazzz
Related why in older C `?!! ?!!` is the same as `||`.

👤 bjourne
SIGPIPE, ¦ Error messages were brief back in the old days.