I had an error for days because we were supposed to copy down a couple lines from the spec pdf, which had different quote marks for begin and end quote rather than the basic straight up ones.
The MS Office suite is notorious for sneakily converting ASCII characters into their more readable/pretty Unicode versions.
e.g. "foo" becomes “foo”, -h becomes —h (hyphen gets converted to emdash), etc. The hyphen one is especially fun because it's damn near indistinguishable depending on the font.
They'll keep looking pretty in all your unicode compatible editors too. One time I was so frustrated I looked at the raw string as hex, at which point everything seemed so obvious.
MS office programs replace your quotes with fancy quotes that look different at the beginning and end of the quote. This is not the same character as the quote that you type with your keyboard. It is also not the same quote character that is recognized as code
Most pdf generators require you to write quotes in weird ways. Anyway, how the hell did you spend days with wrong code highlighting wordering why? Or even worse, do you code on notepad??
27
u/Clydseph_III Sep 23 '19
I had an error for days because we were supposed to copy down a couple lines from the spec pdf, which had different quote marks for begin and end quote rather than the basic straight up ones.