The following describes an issue that we had with pulling RSS feeds from WordPress and displaying them on web pages and how we resolved the problem. The main issue was that some characters where being displayed as garbage on the screen. It took many months of research and testing out different things to get this issue resolved.
Problem
The main issue lied within the character encoding of the page where there information was being displayed. The information coming from WordPress and the RSS feed was encoded with UTF-8 which allows for more than 128 ASCII characters; whereas, the HTML page it was being display on was encoded with iso-8859-1.
Solution
Change the encoding on the HTML page to UTF-8. This fixes the issue and clears up all of the garbage characters.
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Additional Resources
http://en.wikipedia.org/wiki/UTF-8
No comments:
Post a Comment