Hacker News new | past | comments | ask | show | jobs | submit login
When you copy/paste an invisible space in your code (twitter.com/averyautumn_)
2 points by BiteCode_dev on Sept 23, 2023 | hide | past | favorite | 2 comments



All spaces are invisible :)

Hipchat would insert non visible characters when copy and pasting messages. I don't know if they still do. I remember spending an absurd amount of time replacing every single bit of a sql query until I finally discovered that it was the "spaces" that the mysql parser was yelling about.


This existed well before Unicode's dopey multiple kinds of space character.

Leading or trailing ASCII tabs and spaces, or the Windows carriage return aberration would often trip people up. I have a habit of quoting "%s" in C printf, or using "%q" in Go fmt.Printf calls because of that.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: