3 ms·
Tried fixing it so it would run, and the hardest bit was recognizing that the double-quotes weren't actually double-quotes, but rather these two characters: “ ”
by tyingq 10y ago
Tried fixing it so it would run, and the hardest bit was recognizing that the double-quotes weren't actually double-quotes, but rather these two characters: “ ”
- Tempest1981 10y agoSmartquotes... some word processors do that automatically. http://smartquotesjs.com http://smartquotesjs.com
- throwaway2016a 10y agoMore annoyingly, Skype does it. Nothing is worse than when I just want to send a small snippet of code to a colleague and Skype changes all my quotes.
- gizmodo59 10y agoDo something like this in skype: {code} printf("Hello World!"); {code}
- shortstuffsushi 10y agoI may have asked this here before, or perhaps elsewhere... but why do these characters exist? "Smart" quotes end up breaking things for me so frequently, I've never actually wanted them in any case I can think of. Same goes for en/em dashes. I literally spent a day and a half trying to track down an issue less than a month ago, only to realize as I got to the point of inspecting bytes that I wasn't looking at a regular dash (and incidentally that the SDK I was interacting with doesn't support extended characters).
- tyingq 10y agoI don't agree with the premise, but here it is: http://smartquotesjs.com/ http://smartquotesjs.com/
- shortstuffsushi 10y agoshudder
- robin_reala 10y agoNon-‘smart’ quotes (aka typewriter quotes) exist only because space on typewriter keyboards was limited. If we should get rid of any double-quotes then it would be " which has no semantic meaning (unlike “ and ” which open and close a quotation, and ″ which among other things is the unit mark for inches).
- AnimalMuppet 10y ago" has semantic meaning in code, whereas “ and ” have semantic meaning in text. If you're a coder, you want " and only ". You especially don't want "helpful" software that thinks you should want text quotes, and tries to fix them for you.
- 50CNT 10y agoExample in a similar vein, was trying to split Chinese characters by ',', but they were separated by ','.
- greydius 10y agoThey exist to mess with people that copy/paste code from the internet.
- shortstuffsushi 10y agoOr from any "smart" editor like Outlook.