4 ms·
"ZERO WIDTH NO-BREAK SPACE foobar No width (the character is invisible)" Time to insert this into some of my friends code.
by gravypod 10y ago
"ZERO WIDTH NO-BREAK SPACE foobar No width (the character is invisible)"
Time to insert this into some of my friends code.
- squeaky-clean 10y agoI've actually joked with colleagues about this, and often it doesn't work. Try using the U+FEFF in Javascript, in Chrome it's taken as a space (but the console will mark it as a red circle, not an invisible no-width character), and Firefox refuses to even allow it to be entered. You can also use a character and combining character to make a symbol that looks exactly like a semicolon, but technically isn't. Browsers treat it as a semicolon anyways. I wanted to be able to do `var ; = "foobar";` Maybe it will sneak by other languages that allow unicode in the code? Though I don't know of many.
- nitrogen 10y agoI've had problems with code having non-ASCII spaces appended, and the terminal rendering them as zero-width, so I had to use hexdump to find the problem.
- sedachv 10y agoAlso fun are left-to-right and right-to-left marks.
- squeaky-clean 10y agoThis is a level of evil I hadn't considered.
- sedachv 10y agoAs Seen in Production™