How do I convert the Microsoft Word apostrophe to an HTML friendly apostrophe?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zentz
    Confirmed User
    • Nov 2003
    • 8062

    #1

    How do I convert the Microsoft Word apostrophe to an HTML friendly apostrophe?

    how do i convert ms word apostrophes to html friendly apostrophes in my WP and other mysql databases?

    thank you
    Programs that owe me money ---- Epassporte.com ~ $2700 | Protraffic.com ~ $2600 | XonDemand.com ~ $3000

    Email: [email protected]
  • TheDoc
    Too lazy to set a custom title
    • Jul 2001
    • 13827

    #2
    Replace them with: & #39 ;
    ~TheDoc - ICQ7765825
    It's all disambiguation

    Comment

    • zentz
      Confirmed User
      • Nov 2003
      • 8062

      #3
      which sql should i run?
      Programs that owe me money ---- Epassporte.com ~ $2700 | Protraffic.com ~ $2600 | XonDemand.com ~ $3000

      Email: [email protected]

      Comment

      • GrouchyAdmin
        Now choke yourself!
        • Apr 2006
        • 12085

        #4
        update table set foo=replace(foo, 'bad', 'good');

        Comment

        • farkedup
          Confirmed User
          • Nov 2007
          • 2490

          #5
          best tip is to not use MS word ;)
          -- QUOTE ME IT MAKES ME FEEL SPECIAL --

          Comment

          • zentz
            Confirmed User
            • Nov 2003
            • 8062

            #6
            Originally posted by farkedup
            best tip is to not use MS word ;)
            thats the plan but i have to replace the existing ones
            Programs that owe me money ---- Epassporte.com ~ $2700 | Protraffic.com ~ $2600 | XonDemand.com ~ $3000

            Email: [email protected]

            Comment

            • Sosa
              In Tushy Land
              • Oct 2002
              • 40149

              #7
              Yeah, it sucks when text writers use word and then I throw it into dreamweaver and all the ' are fucked up

              Comment

              • zentz
                Confirmed User
                • Nov 2003
                • 8062

                #8
                $20 epass to whoever gives me the correct query to execute.
                Programs that owe me money ---- Epassporte.com ~ $2700 | Protraffic.com ~ $2600 | XonDemand.com ~ $3000

                Email: [email protected]

                Comment

                • FlexxAeon
                  Confirmed User
                  • May 2003
                  • 3765

                  #9
                  Originally posted by GrouchyAdmin
                  update table set foo=replace(foo, 'bad', 'good');
                  give it to grouchy...

                  "table" = name of table
                  "foo" = field name
                  bad = that bad apostrophe
                  good = good apostrophe

                  Code:
                  UPDATE tablename SET fieldname = replace(fieldname, '*funky apostrophe here*', ''');
                  something like that
                  flexx [dot] aeon [at] gmail

                  Comment

                  • zentz
                    Confirmed User
                    • Nov 2003
                    • 8062

                    #10
                    i tried this

                    update wp_posts set post_content = replace(post_content,'''', ''')

                    as funky apostrophe is showing as '' in mysql.

                    the error i get is:

                    ERROR: Unclosed quote @ 62
                    STR: '
                    SQL: update wp_posts set post_content = replace(post_content,'''', ''')

                    when i try to replace it with something else then ''' , example 'fuck' it works fine. any ideas?
                    Programs that owe me money ---- Epassporte.com ~ $2700 | Protraffic.com ~ $2600 | XonDemand.com ~ $3000

                    Email: [email protected]

                    Comment

                    • GrouchyAdmin
                      Now choke yourself!
                      • Apr 2006
                      • 12085

                      #11
                      You need to escape it. '\'' or '\"'.

                      Comment

                      • FlexxAeon
                        Confirmed User
                        • May 2003
                        • 3765

                        #12
                        Originally posted by zentz
                        i tried this

                        update wp_posts set post_content = replace(post_content,'''', ''')

                        as funky apostrophe is showing as '' in mysql.

                        the error i get is:

                        ERROR: Unclosed quote @ 62
                        STR: '
                        SQL: update wp_posts set post_content = replace(post_content,'''', ''')

                        when i try to replace it with something else then ''' , example 'fuck' it works fine. any ideas?
                        bah...my bad i was trying to edit my post and my boss walked in to talk lol...

                        dont use an actual apostrophe, use & #39 with space removed between & and 3

                        the funky apostrophe should carry over ok though if you copy/paste it directly from Word
                        flexx [dot] aeon [at] gmail

                        Comment

                        • FlexxAeon
                          Confirmed User
                          • May 2003
                          • 3765

                          #13
                          or yeah escape it like grouchy just said (duh...forgot about that)

                          Code:
                          update wp_posts set post_content = replace(post_content,'*funky*', '\'');
                          flexx [dot] aeon [at] gmail

                          Comment

                          Working...