Yesterday, I decided to host my feeds with FeedBurner like many bloggers do. There is no problem to create a feed of this blog, however when i tried to create a feed for my Chinese blog, FeedBurner refuse to continue because it said that my feed can’t be validated:
http://feedvalidator.org/check.cgi?url=http%3a%2f%2frobertmao.com%2ffeed
Sorry
This feed does not validate.
line 167, column 77: ‘utf8′ codec can’t decode bytes in position 10676-10678: invalid data (maybe a high-bit character?) [help]
…
In addition, this feed has issues that may cause problems for some users.
We recommend fixing these issues.
line 115, column 21: description contains bad characters [help]
…
After I check the error message, it seemed that the problem is from my blog post content, I did copy/paste some text from some other website in some of my posts, but how could I know those text may contain invalid UTF-8 char? It seemed to be a serious problem.
I can’t believe that why FeedBurner can’t handle this, since my feed can be read correctly in Firefox, Google Reader, Bloglines, and a bunch of other RSS readers, aggregators. But since it can’t handle, and my feed did have problem to pass validation, it’s my job to fix it.
I wrote a very simple wordpress plugin to fix this problem, it will correct all possible invalid UTF-8 data inside the feed content. After I activate my plugin, my feed can pass the validation correctly, so I have no problem to use FeedBurner any more.
I release this simple wordpress plugin here, just in case someone else have similar problem as I had.
Download: wordpress plugin to fix the invalid UTF-8 data inside the feed
Version: 1.0
Install: Download and unzip the file in your wp-content/plugins directory, and then “activate” the plugin in your admin panel’s “plugins” menu.
Popularity: 16% [?]
Share This