set theText to "I'm \"NO, the is the 'Right Way!'\" she replied. 6' 2\" tall"
set theDoneReplace to doReplace(theText, " ", " ") as text
set theDoneReplace to doReplace(theText, "\\", "") as text
set theDoneReplace to doReplace(theDoneReplace, "′", "'") as text
set theDoneReplace to doReplace(theDoneReplace, " \"", " “") as text
set theDoneReplace to doReplace(theDoneReplace, "\" ", "” ") as text
set theDoneReplace to doReplace(theDoneReplace, "\"", "\\\"") as text
set theDoneReplace to do shell script "echo \"" & theDoneReplace & "\" | awk 'gsub(/(\"$)/, \"”\") \"\"'"
set theDoneReplace to doReplace(theDoneReplace, "\"", "\\\"") as text
set theDoneReplace to do shell script "echo \"" & theDoneReplace & "\" | awk 'gsub(/(^\")/, \"“\") \"\"'"
set theDoneReplace to doReplace(theDoneReplace, " '", " ‘") as text
set theDoneReplace to doReplace(theDoneReplace, "' ", "’ ") as text
set theDoneReplace to doReplace(theDoneReplace, "“'", "“‘") as text
set theDoneReplace to doReplace(theDoneReplace, "'“", "‘“") as text
set theDoneReplace to doReplace(theDoneReplace, "”'", "”’") as text
set theDoneReplace to doReplace(theDoneReplace, "'”", "’”") as text
set theDoneReplace to doReplace(theDoneReplace, "\"", "\\\"") as text
set theDoneReplace to do shell script "echo \"" & theDoneReplace & "\"| awk 'gsub(/'\\''$/, \"’\" ) \"\"'"
set theDoneReplace to doReplace(theDoneReplace, "\"", "\\\"") as text
set theDoneReplace to do shell script "echo \"" & theDoneReplace & "\" | awk 'gsub(/^'\\''/, \"‘\" ) \"\"'"
set theDoneReplace to doReplace(theDoneReplace, "\"", "\\\"") as text
set theDoneReplace to do shell script "echo \"" & theDoneReplace & "\"| sed -e 's/\\([0-9]\\)\\(’\\)\\( \\)/\\1′\\3/g'"
set theDoneReplace to doReplace(theDoneReplace, "\"", "\\\"") as text
set theDoneReplace to do shell script "echo \"" & theDoneReplace & "\"| sed -e 's/\\([0-9]\\)\\(”\\)\\( \\)/\\1′\\3/g'"
tell application "TextEdit" to launch
tell application "TextEdit"
make new document with properties {text:theDoneReplace}
tell document 1
properties
set font to "Georgia"
set size to 48
end tell
end tell
tell application "TextEdit" to activate
to doReplace(theText, orgStr, newStr)
set oldDelim to AppleScript's text item delimiters
set AppleScript's text item delimiters to orgStr
set tmpList to every text item of theText
set AppleScript's text item delimiters to newStr
set tmpStr to tmpList as text
set AppleScript's text item delimiters to oldDelim
return tmpStr
end doReplace