i have setup my custom content publishing script which is working great except for the part that when i publish content in it by copying it from external sources like from my other websites some special characters like (' " ) becomes this (� ) i have no idea why this is happening,so is there any way that i can fix this.

i'm not 100% sure, but my guess is that you used the special characters and not their codes when you created the pages initially, besides that, you can't use special characters (should really not) and rather use the code, for instance:

" should be "
' should be ·

etc. so you should go and change it in any way if it is giving you gibberish symbols

i already did that but same errors

Member Avatar for diafol

Change your page encoding and browser encoding to UTF-8. If your data is coming from a DB, ensure that your encoding is right. You mention external sources, from where? Files, DBs, XML, website scrapes?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.