Tuesday, August 25, 2009

Character sets, utf-8 and surviving jQuery

ok - here's the key that may help you if characters display oddly when you're pulling them into your page, say from another like a feed2js or using jquery's ajax functions - if you haven't double-checked this and strange characters appear instead of various punctuation marks (for example, the apostrophe '), it's possible that you have the wrong character set referenced in the head section of your html page.
This is particularly common if, god forbid, you've been using Microsoft tools & somehow, the setting has been for:
meta http-equiv="Content-Type" content="text/html; charset=windows-1252"

Instead, try this:
meta http-equiv="Content-type" content="text/html; charset=utf-8"
Worked for me with a jQuery AJAX issue. Hope it helps you.

No comments: