Convert Quotes to Curly Smart Quotes

7 posts by 3 authors in: Forums > CMS Builder
Last Post: March 4, 2021   (RSS)

By JeffC - December 14, 2020

Hi

Is there a way to convert quotes to smart quotes? I have 1500+ products that that been uploaded from a csv file. I would like to change:

' to ‘
' to ’

" to “
" to ”

I tried a find and replace using PHP MyAdmin but it didn't recognise the difference between the characters.

Could this be done using Developer Console?

Thanks

Jeff

Hey Jeff,

I did a google search for your question  IE: Convert Quotes to Curly Smart Quotes php, and came up with lots of suggestions using simple preg_replace commands.

You might want to give that a try and see what you come up with, or look at this one: https://www.neowin.net/forum/topic/1387562-php-convert-straight-quotes-to-smart-quotes/

Good luck,

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

By JeffC - December 14, 2020

Thanks for taking the time to comment Jerry.

I found that too. I wondered though, would it be better performance-wise to convert them in the backend cms once, rather than leaving it to php each time a website is loaded.

Thanks

Jeff

I suppose that technically, the answer is yes, but I'm not sure that it will make a difference in  the real world.

Maybe someone has a suggestion for the back end approach

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

By Jenna - February 1, 2021

Hi Jeff,

Are you still looking for us to chime in on this one? I notice it's from December 2020.

Please let us know if you're still looking for assistance.

Jenna Cooke - PHP Programmer
interactivetools.com

By JeffC - March 3, 2021

Hi Jenna

Thanks for following up, and sorry for the delayed reply. I'm not having much joy actually. Your help would be appreciated.

Jerry's post was helpful, and I think a php approach would be fine. Just not sure how to apply a universal rule to affect all the text on a page.

Thanks

Jeff