I'm working on a web site with a content management system that does a bad job of displaying any text with non-ASCII characters. For example, right single-quotes show up as on the following web page (this is just an example, not from the CMS-driven web site):
http://www.gregboettcher.com/cmsunicode.html
I can't control the inner workings of the CMS, but still I'd like to try to fix this glitch somehow.
I tried messing around with the charset definition of the page, but changing it from UTF-8 to ANSI or UCS-2 just made it worse.
Here is my main question: Could JavaScript be used to somehow find badly encoded Unicode characters and make them display properly?
I'm grasping at straws here. Many thanks to anyone who can help.
Edited June 12:
To everybody who replied, thanks for giving some helpful responses to a pretty vague question.
I've looked into this some more, and it looks like the CMS is writing UTF-8 to the database, but then reading it from the database with the expectation of something other than UTF-8 (even though it then produces web pages that say "charset=UTF-8").
I agree it would probably be best to try to fix this by preventing non-ASCII characters from being written to the database, but with the CMS I'm using, that's not very practical.
I told my supervisor we could still use JavaScript to fix the problem on the client side, but when I explained what it would involve, he told me not to bother. He seems content to understand what's causing the problem, and forward the bug on to the makers of the CMS.
So thanks -- I learned something about text encoding and JavaScript from this.