Quote:
Originally Posted by JSWolf
Mind posting your steps please? Thanks.
|
It's a pretty simplistic solution. First I convert the 4 flavours of curly quotes into strings of ~ and % and then convert those back into curly quotes.
“ => ~%~% => ‘
” => %~%~ => ’
‘ => ~%%~ => “
’ => %~~% => ”
So the sentence I used in my sample comes out looking like after the first pass:
Code:
<p>John said ~%%~I asked Bill and he said ~%~%You should be ashamed of yourself.%~%~ %~~%</p>
I do check first to make sure that someone has not used one of those strings but so far, that has not happened. I also use a cleanup search for a double curly quote between two letters which gets replaced by a right single curly quote if needed. Given that you should never see a curly quote in the code segment, this pretty much covers my needs. These are part of my saved searches.