calloutText = c.replace(/(“|”)/g, "'");
If you want to find quotes, you have to type them in the 1st parameter -- Alt+147 and Alt+148 characters (on Windows) -- instead of double quotes. In the 2nd parameter, you don't need escape the single quote inside the double quotes.
1 person found this helpful
Kasyan's Find string contains the actual characters you should be searching for.
Thanks, Kasyan, that was the clue I needed. I found that on my keyboard (Windoze) I have to make the key code four digits to show the correct quote, i.e.:
alt+ 0147: “ = left curly double quote
alt+ 0148: ” = right curly double quote
alt+ 0149: • = bullet character
alt+ 0145: ‘ = left curly single quote
alt+ 0146: ’ = right curly single quote, etc.
I wonder if there's a convenient reference to these key codes somewhere. I did a bit of searching and didn't find it. The ID CS4 manual lists all keyboard shortcuts, but has next to nothing on these key codes. No doubt they vary depending on the font's character set...
Thanks for your observations as well, Jongware. I'd like to see the answer to your question as well.
I wonder if there's a convenient reference to these key codes somewhere.
I use Character Map application to find Alt key numeric codes. I am sure in Google you can find a lot of such references -- here is my first hit.
> I use *Character Map* application to find Alt key numeric codes.
Excellent, Kasyan, thanks. Turns out my machine didn't have Character
Map installed, but it does now. It's always a marvel how much difference it
makes to have the precise terminology.