A common question on Statalist results from the user copying-and-pasting into Stata a piece of code containing "smart" (or "typographic") single and double quotes, either created in a text editor such as Word that "smartens" quotation marks, or from the Stata PDF documentation, Stata Journal articles, and other published material.

On upgrading to Stata 17 and comparing my Stata Preference settings to those from Stata 16, I discovered a new General preference: Paste curly quotes as ASCII quotes. This option is selected by default, at least in my installation, and does not seem to appear in the help whatsnew files.

If I copy
Code:
local vars “price weight”
describe ‘shortcut’
and paste it into the Do-file editor the result is the correctly-punctuated code
Code:
local vars "price weight"
describe `shortcut'
I thank the developers at StataCorp who devised and implemented this solution to the problem.

From my side, I'll update the snarky boilerplate explanation I've used to respond to these questions in the past.