In the one available on my machine, current text use - logically - LEFT DOUBLE QUOTATION MARK ( U+201C) and RIGHT DOUBLE QUOTATION MARK (U+201D).
In the code samples - logically - they use QUOTATION MARKs (straight double quotes, U+0022).
In my own messages, sometimes I use both.
The typographical curly double quotes are used as delimiters enclosing text which contains the QUOTATION MARKs.
For instance, yesterday I posted a message embedding :
replace all “\r\n” by ““&return&linefeed&””
replace all “\r” by ““&return&””
replace all “\n” by ““&linefeed&””.
What sometimes bored me is the fact that, according to the application used to create messages, from time to time, in blocks of code, a QUOTATION MARK is replaced by a RIGHT or a LEFT DOUBLE QUOTATION MARK.
In such case, the Script Editor refuse to compile but happily, most of the time, it highlight the offending character.
Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) vendredi 29 janvier 2021 16:30:33
On page 207 in AppleScript Language Guide from 2013
This is ex of description not source code.
The current user’s short name
The current user’s long name
The current user’s user ID
This is right single quotation mark is not supported in AppleScript source code when compiling.
You couldn’t do:
set a to "hello"
Every example of source code in AppleScript Language Guide use apostrophe and that is supported.
My point with this topic was when we write source code of any scripting or programming language
it makes sense to know what that specific language do support because if we do not.
Copy/paste of any text of source code could fail and return error. And that is not maybe
what the author of source code had in mind.
When Applescript was created, the allowed characters were only the ASCII (lower than 129) ones.
It’s not surprising that other characters aren’t accepted as operators.
I use daily smart quotes but I never activated the Smart Quotes preference because I know that AppleScript doesn’t accept such characters as components of its syntax.
When I want to type a curly quote I press alt + double quote or single quote, with or without shift depressed to get the correct orientation.
Back to the User Guide, curly single quotes are used in ‘standard’ text, straight single quotes are used as possessive shortcut in code samples.
set a to "hello"
a's first character --> "h"
a's last character --> "o"
-- set b to 'hello' -- can't compile
Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) vendredi 29 janvier 2021 20:44:40