Reputation: 1
I used the following but it does not recognize the smart quotes
set EmailSubject [string map -nocase {“ \\u0093 } $EmailSubject]
I am using TCL
Upvotes: 0
Views: 265
Reputation: 5723
There are several issues here.
\u0093
doing there? That's a control character.\u....
will not be converted when inside braces.-nocase
is not needed, alpha characters are not being converted.\u....
format rather than embedding the “
characters.I am also going to make an assumption that by "converting into ascii", you want the ordinary "
character. If this is wrong, please update your question.
The characters to convert are \u201C and \u201D, the left and right curly quotation marks. So the string map command will look like:
set EmailSubject [string map [list \u201C \" \u201D \"] $EmailSubject]
This converts both \u201C and \u201D into the "
character.
Upvotes: 1