Loading ...
Sorry, an error occurred while loading the content.
 

Re: [Clip] Simple ^!Replace for smartquotes

Expand Messages
  • hsavage
    ... Todd, The elements in the ^!Replace commands may need to be wrapped in quotes as below. hrs H= Reset Smart quotes ;Removes curly quotes with HTML code ;
    Message 1 of 3 , Sep 15, 2003
      hsavage wrote:

      > Todd Haugland wrote:
      >
      >> I'm trying to write a clip that replaces "Smart quotes" and
      >> apostrophes on an HTML page with the correct HTML code: either
      >> “ and ” or " I don't really care.
      >>
      >
      > Todd,
      >
      > I'm not sure if the character values are correct but try these 2
      > modified clips for removing 'smart quotes' and 'smart apostrophes'.
      >
      > hrs
      >
      >
      > H="Reset Smart quotes"
      > ;Removes curly quotes with HTML code
      >
      > H="Reset Apostrophes"
      > ;Replaces so-called "smart apostrophes" with HTML Code.

      Todd,

      The elements in the ^!Replace commands may need to be wrapped in quotes
      as below.

      hrs


      H="Reset Smart quotes"
      ;Removes curly quotes with HTML code
      ; char 147 = left double quote
      ^!Replace "^$DecToChar(147)$" >> """ TIWSA
      ; char 148 = right double quote
      ^!Replace "^$DecToChar(148)$" >> """ TIWSA

      H="Reset Apostrophes"
      ;Replaces so-called "smart apostrophes" with HTML Code.
      ; I don't know what smart apostrophes are but try this
      ^!Replace "^$DecToChar(39)$" >> "’" TIWSA
      ; this apostrophe leans to the left
      ^!Replace "^$DecToChar(96)$" >> "’" TIWSA
      ; this apostrophe leans to the right
      ^!Replace "^$DecToChar(180)$" >> "’" TIWSA
    Your message has been successfully submitted and would be delivered to recipients shortly.