Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Wrong Pipe Character?
21 points by jbverschoor 16 days ago | hide | past | favorite | 12 comments
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?

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

Seconded, Nostalgia Nerds video on it ( https://www.youtube.com/watch?v=BktIY7VbrUs ) is an excellent breakdown of why we have two pipe chars: | and ¦

Ah cool video Can't believe I forgot that dos also had the broken bar, as well as the older keyboards :-)

> Many keyboards with US or US-International layout display the broken bar on a keycap even though the solid vertical bar character is produced. This includes many German QWERTZ keyboards.

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).

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

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.

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

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

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact