Hacker News new | past | comments | ask | show | jobs | submit
My favorite unicode character is zero width space. One of its funniest properties is that it's not a whitespace.

Also, some programming languages treat it as a valid identifier.

loading story #50334243
Ha! Yes I discovered that this is true in C as part of my IOCCC entry:

https://github.com/ioccc-src/winner/blob/master/2025/ncw3/pr...

Braille Pattern Blank "⠀" (U+2800) is another one of my favourites, since it's also not considered whitespace, but it looks like it. It can actually be fairly helpful for forms that won't let you leave any field blank, since it bypasses most whitespace checks.
loading story #50334319
I use it for sites like Facebook where I want to type :) without it changing to the terrible `U+1F642 SLIGHTLY SMILING FACE` [1]. I wouldn't really mind if it were the `U+1F60A SMILING FACE WITH SMILING EYES` [2], but the first one is so laughably terrible, as if I'd really want to send an emoji to communicate a disingenuous, pained smile as a default. Some platforms let you backslash-escape sequences so they don't get turned to emoji, like \:), but for Facebook and the like, putting a ZWS in between the letters stops the conversion.

Though if your emoji is at the end of a line, it'll potentially break your emoji between the two lines. since That's what a ZWS is for, after all.

1. https://util.unicode.org/UnicodeJsps/character.jsp?a=%F0%9F%...

2. https://util.unicode.org/UnicodeJsps/character.jsp?a=1F60A&B...

loading story #50334395
loading story #50328854
loading story #50330518
> My favorite unicode character is zero width space. One of its funniest properties is that it's not a whitespace.

My editor is configured to never show any character (except the one and proper newline) at less than the full-width of a regular character (in the monospace font I'm using ofc).

And if it's not a visible ASCII char, not only it's always shown at least at full-width, it's also shown as bold magenta on a black background. As the non visibe zero-width is empty, it shows as full-width on a black background.

Sticks out like a sore thumb.

loading story #50329197