5 ms·
Replacing ascii with similar-looking unicode characters is an old trick. There's a bunch of these characters out there. You can use it in the code to prank your
by brunosutic 3y ago
Replacing ascii with similar-looking unicode characters is an old trick. There's a bunch of these characters out there. You can use it in the code to prank your colleague developers - April 1st is nearing!
I even made a vim plugin that highlights these "dangerous" characters: https://github.com/vim-utils/vim-troll-stopper https://github.com/vim-utils/vim-troll-stopper
I've never been pranked with unicode characters, but I've had a situation at work where a consultant from Japan unintentionally used some "japanese space" characters in a translation file, and that broke our app. Since I have my vim plugin running all the time it didn't take me a lot to see what's going on.
- lostlogin 3y agoThe accidental crap can go a long way. I recall someone using a superscript ‘O’ as a degrees symbol in a medical report. This then got converted to a non—superscript character and rather changed the meaning. Extra unhelpful was that they wrote the word ‘degrees’ after the attempt at the symbol too.
- kzrdude 3y agoThere's also the Spanish superscript a and o symbols (used for ordinals) that can be confused for this.
- xp84 3y ago“patient’s temperature was approaching 100O degrees” Very nice error :D
- lostlogin 3y agoIt was a measurement of angle for an ortho surgeon. However as you point out, wrong by a x10 multiplier has the sanity checks kicking in.
- stefan_ 3y agoLots of apps have helpfully started turning two dashes (—-) into some sort of Unicode long dash that is more aesthetically pleasing, while also breaking command line tools.
- latexr 3y agoLooks like that happened to you in your comment. The em dash doesn’t exist to be aesthetically pleasing, it has a meaning in writing. https://en.wikipedia.org/wiki/Dash#Em_dash https://en.wikipedia.org/wiki/Dash#Em_dash What you’re seeing is the result of software being more typographically conscious and replacing the incorrect characters we got used to typing in our keyboards with the correct ones. Same reason why " is replaced with “ and ”. But you’re right that is annoying in a programming environment.
- lupire 3y agoThe em dash glyph is an aesthetically version of the em dash digraph.
- lloeki 3y agoHeh, I kinda don't like these typing replacements (also, "smart" quotes). If I type `--` it's because I want `--` (or even `-------` but some software† insists on changing that to a sequence of en-dash), especially I can type them easily on macOS: - minus key: minus char - - Option+minus: en dash – - Option+Shift+minus: em dash — Similarly, opening and closing single and double quotes are on bracket keys. † yes there are OS-level settings for that (at least on macOS) but other software do it in addition to the SO, and you can't disable it plus it plays badly with undo.
- aendruk 3y agoIndeed “smart” quotes are a nuisance and it’s a small tragedy that curved quotes go typically unused. I gave myself a dedicated `“` key to make it the default in everyday use. “ → “ Shift+“ → ” Option+“ → "
- HankB99 3y agoThat's one of the reasons I abandoned Google Docs for keeping notes on administering my home computer lab. I use Linux so much of what I did involved typing commands in a terminal window. I would copy the text into document and later copy back to a terminal. It often didn't work due to the way Google transmogrified the text in ways not obvious to the eye. I now use Markdown (and store notes on a private server) so commands can readily be replayed.
- b0ner_t0ner 3y agoOh, I remember this one: https://news.ycombinator.com/item?id=10438363 https://news.ycombinator.com/item?id=10438363